Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[unstyled] Create package and move SliderUnstyled there #23270

Merged
merged 30 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5901bda
move core/utils to utils
mnajdova Oct 26, 2020
c9489d7
prettier
mnajdova Oct 26, 2020
e866f5e
MuiError
mnajdova Oct 26, 2020
080dd7e
ts-ignore
mnajdova Oct 26, 2020
a717de8
scafolded new unstyled package and moved SliderUnstyled
mnajdova Oct 26, 2020
a31e1b0
proptypes & build:api updates
mnajdova Oct 26, 2020
7557b42
fixed exports
mnajdova Oct 26, 2020
a1fdfb4
typings
mnajdova Oct 26, 2020
562b060
lint errors & types fixes
mnajdova Oct 26, 2020
96a2f55
docs:api
mnajdova Oct 26, 2020
9b389b6
renamed Slider to SliderUnstyled
mnajdova Oct 27, 2020
ad82d99
Merge branch 'next' into feat/slider-unstyled-new-package
mnajdova Oct 27, 2020
b54dfd9
lint and ts errors
mnajdova Oct 27, 2020
c625415
Add compat for usage in utils itself
eps1lon Oct 27, 2020
bd907da
Fix lint
eps1lon Oct 27, 2020
3e1a26b
fixed unstyled path resolution
mnajdova Oct 27, 2020
324b3a8
exported new utils as unstable_
mnajdova Oct 27, 2020
11bbc63
Merge pull request #11 from eps1lon/feat/add-core-utils-to-utils-comp…
mnajdova Oct 27, 2020
1f11303
prettier
mnajdova Oct 27, 2020
d20209d
lint error fixed
mnajdova Oct 27, 2020
eb881e3
Merge branch 'feat/add-core-utils-to-utils' into feat/slider-unstyled…
mnajdova Oct 28, 2020
0767f6a
merged feat/add-core-utils-to-utils and updates
mnajdova Oct 28, 2020
a9a4247
replaced .ts files with original .js & d.ts files
mnajdova Oct 28, 2020
3957119
fixed import
mnajdova Oct 28, 2020
328ca77
removed file
mnajdova Oct 28, 2020
2747327
removed file
mnajdova Oct 28, 2020
1cd7521
Merge branch 'feat/add-core-utils-to-utils' into feat/slider-unstyled…
mnajdova Oct 28, 2020
6e4b92f
Merge branch 'next' into feat/slider-unstyled-new-package
mnajdova Oct 28, 2020
d57039e
fixed codesadnbox version for the new package
mnajdova Oct 28, 2020
d62e6a9
Update packages/material-ui-lab/package.json
mnajdova Oct 29, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"packages/material-ui-system",
"packages/material-ui-types",
"packages/material-ui-utils",
"packages/material-ui-unstyled",
"packages/material-ui-styled-engine",
"packages/material-ui-styled-engine-sc"
],
Expand All @@ -20,7 +21,8 @@
"@material-ui/styled-engine-sc": "packages/material-ui-styled-engine-sc/build",
"@material-ui/system": "packages/material-ui-system/build",
"@material-ui/types": "packages/material-ui-types",
"@material-ui/utils": "packages/material-ui-utils/build"
"@material-ui/utils": "packages/material-ui-utils/build",
"@material-ui/unstyled": "packages/material-ui-unstyled/build"
},
"sandboxes": [
"material-ui-issue-dh2yh",
Expand Down
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const defaultAlias = {
'@material-ui/styled-engine-sc': './packages/material-ui-styled-engine-sc/src',
'@material-ui/styles': './packages/material-ui-styles/src',
'@material-ui/system': './packages/material-ui-system/src',
'@material-ui/unstyled': './packages/material-ui-unstyled/src',
'@material-ui/utils': './packages/material-ui-utils/src',
'typescript-to-proptypes': './packages/typescript-to-proptypes/src',
};
Expand Down
1 change: 1 addition & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const alias = {
// '@material-ui/styled-engine': '../packages/material-ui-styled-engine-sc/src',
'@material-ui/system': '../packages/material-ui-system/src',
'@material-ui/utils': '../packages/material-ui-utils/src',
'@material-ui/unstyled': '../packages/material-ui-unstyled/src',
docs: './',
modules: '../modules',
pages: './pages',
Expand Down
1 change: 1 addition & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ module.exports = {
'@material-ui/styles': '../packages/material-ui-styles/src',
'@material-ui/system': '../packages/material-ui-system/src',
'@material-ui/utils': '../packages/material-ui-utils/src',
'@material-ui/unstyled': '../packages/material-ui-unstyled/src',
},
transformFunctions: ['require'],
},
Expand Down
1 change: 1 addition & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@material-ui/styles": "^5.0.0-alpha.1",
"@material-ui/system": "^5.0.0-alpha.1",
"@material-ui/types": "^5.0.0",
"@material-ui/unstyled": "^5.0.0-alpha.1",
"@trendmicro/react-interpolate": "^0.5.5",
"@types/autosuggest-highlight": "^3.1.0",
"@types/css-mediaquery": "^0.1.0",
Expand Down
24 changes: 0 additions & 24 deletions docs/pages/api-docs/slider-styled.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,7 @@ You can learn more about the difference by [reading this guide](/guides/minimizi

| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">aria-label</span> | <span class="prop-type">string</span> | | The label of the slider. |
| <span class="prop-name">aria-labelledby</span> | <span class="prop-type">string</span> | | The id of the element containing a label for the slider. |
| <span class="prop-name">aria-valuetext</span> | <span class="prop-type">string</span> | | A string value that provides a user-friendly name for the current value of the slider. |
| <span class="prop-name">color</span> | <span class="prop-type">'primary'<br>&#124;&nbsp;'secondary'</span> | | The color of the component. It supports those theme colors that make sense for this component. |
| <span class="prop-name">components</span> | <span class="prop-type">{ Mark?: elementType, MarkLabel?: elementType, Rail?: elementType, Root?: elementType, Thumb?: elementType, Track?: elementType, ValueLabel?: elementType }</span> | <span class="prop-default">{}</span> | The components used for each slot inside the Slider. Either a string to use a HTML element or a component. |
| <span class="prop-name">componentsProps</span> | <span class="prop-type">object</span> | | The props used for each slot inside the Slider. |
| <span class="prop-name">defaultValue</span> | <span class="prop-type">Array&lt;number&gt;<br>&#124;&nbsp;number</span> | | The default element value. Use when the component is not controlled. |
| <span class="prop-name">disabled</span> | <span class="prop-type">bool</span> | | If `true`, the slider will be disabled. |
| <span class="prop-name">getAriaLabel</span> | <span class="prop-type">func</span> | | Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.<br><br>**Signature:**<br>`function(index: number) => string`<br>*index:* The thumb label's index to format. |
| <span class="prop-name">getAriaValueText</span> | <span class="prop-type">func</span> | | Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.<br><br>**Signature:**<br>`function(value: number, index: number) => string`<br>*value:* The thumb label's value to format.<br>*index:* The thumb label's index to format. |
| <span class="prop-name">isRtl</span> | <span class="prop-type">bool</span> | | Indicates whether the theme context has rtl direction. It is set automatically. |
| <span class="prop-name">marks</span> | <span class="prop-type">Array&lt;{ label?: node, value: number }&gt;<br>&#124;&nbsp;bool</span> | | Marks indicate predetermined values to which the user can move the slider. If `true` the marks will be spaced according the value of the `step` prop. If an array, it should contain objects with `value` and an optional `label` keys. |
| <span class="prop-name">max</span> | <span class="prop-type">number</span> | | The maximum allowed value of the slider. Should not be equal to min. |
| <span class="prop-name">min</span> | <span class="prop-type">number</span> | | The minimum allowed value of the slider. Should not be equal to max. |
| <span class="prop-name">name</span> | <span class="prop-type">string</span> | | Name attribute of the hidden `input` element. |
| <span class="prop-name">onChange</span> | <span class="prop-type">func</span> | | Callback function that is fired when the slider's value changed.<br><br>**Signature:**<br>`function(event: object, value: number \| number[]) => void`<br>*event:* The event source of the callback. **Warning**: This is a generic event not a change event.<br>*value:* The new value. |
| <span class="prop-name">onChangeCommitted</span> | <span class="prop-type">func</span> | | Callback function that is fired when the `mouseup` is triggered.<br><br>**Signature:**<br>`function(event: object, value: number \| number[]) => void`<br>*event:* The event source of the callback. **Warning**: This is a generic event not a change event.<br>*value:* The new value. |
| <span class="prop-name">orientation</span> | <span class="prop-type">'horizontal'<br>&#124;&nbsp;'vertical'</span> | | The slider orientation. |
| <span class="prop-name">scale</span> | <span class="prop-type">func</span> | | A transformation function, to change the scale of the slider. |
| <span class="prop-name">step</span> | <span class="prop-type">number</span> | | The granularity with which the slider can step through values. (A "discrete" slider.) The `min` prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible by the step.<br>When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop. |
| <span class="prop-name">sx</span> | <span class="prop-type">object</span> | | The system prop that allows defining system overrides as well as additional CSS styles. |
| <span class="prop-name">track</span> | <span class="prop-type">'inverted'<br>&#124;&nbsp;'normal'<br>&#124;&nbsp;false</span> | | The track presentation:<br>- `normal` the track will render a bar representing the slider value. - `inverted` the track will render a bar representing the remaining slider value. - `false` the track will render without a bar. |
| <span class="prop-name">value</span> | <span class="prop-type">Array&lt;number&gt;<br>&#124;&nbsp;number</span> | | The value of the slider. For ranged sliders, provide an array with two values. |
| <span class="prop-name">valueLabelDisplay</span> | <span class="prop-type">'auto'<br>&#124;&nbsp;'off'<br>&#124;&nbsp;'on'</span> | | Controls when the value label is displayed:<br>- `auto` the value label will display when the thumb is hovered or focused. - `on` will display persistently. - `off` will never display. |
| <span class="prop-name">valueLabelFormat</span> | <span class="prop-type">func<br>&#124;&nbsp;string</span> | | The format function the value label's value.<br>When a function is provided, it should have the following signature:<br>- {number} value The value label's value to format - {number} index The value label's index to format |

The `ref` is forwarded to the root element.

Expand Down
15 changes: 0 additions & 15 deletions docs/pages/api-docs/slider-unstyled.js

This file was deleted.

62 changes: 0 additions & 62 deletions docs/pages/api-docs/slider-unstyled.md

This file was deleted.

Loading