@gridui/slider 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/dist/styled.js +3 -0
- package/dist/styles.css +102 -0
- package/dist/styles.local.css +71 -0
- package/docs/catalog.json +3 -1
- package/docs/reference/slider.md +10 -10
- package/package.json +12 -8
package/README.md
CHANGED
|
@@ -3,7 +3,17 @@
|
|
|
3
3
|
Core family. Public API: `Slider`, `SliderProps`.
|
|
4
4
|
|
|
5
5
|
Import components from `@gridui/slider` and load `@gridui/slider/styles.css` after Theme.
|
|
6
|
-
|
|
6
|
+
Applications own routes, labels, state persistence, and branding.
|
|
7
|
+
|
|
8
|
+
## Styles
|
|
9
|
+
|
|
10
|
+
Load Theme once. Use `@gridui/slider/styled` for automatic component CSS in
|
|
11
|
+
CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/slider/styles.css`.
|
|
12
|
+
Both entries expose the same root API. The standalone stylesheet includes component
|
|
13
|
+
dependency styles; Theme/reset remain separate. See the
|
|
14
|
+
[integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
|
|
15
|
+
for static HTML loading, SSR limits, and avoiding duplicate CSS.
|
|
16
|
+
|
|
7
17
|
|
|
8
18
|
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/slider/.changeset/history).
|
|
9
19
|
|
package/dist/styled.js
ADDED
package/dist/styles.css
CHANGED
|
@@ -1,3 +1,105 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--spacing: 0.25rem;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
@layer utilities {
|
|
10
|
+
.gridui-u-form--sr-only {
|
|
11
|
+
position: absolute;
|
|
12
|
+
width: 1px;
|
|
13
|
+
height: 1px;
|
|
14
|
+
padding: 0;
|
|
15
|
+
margin: -1px;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
clip-path: inset(50%);
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
border-width: 0;
|
|
20
|
+
}
|
|
21
|
+
.gridui-u-form--m-0 {
|
|
22
|
+
margin: 0px;
|
|
23
|
+
}
|
|
24
|
+
.gridui-u-form--flex {
|
|
25
|
+
display: flex;
|
|
26
|
+
}
|
|
27
|
+
.gridui-u-form--grid {
|
|
28
|
+
display: grid;
|
|
29
|
+
}
|
|
30
|
+
.gridui-u-form--min-w-0 {
|
|
31
|
+
min-width: 0px;
|
|
32
|
+
}
|
|
33
|
+
.gridui-u-form--flex-1 {
|
|
34
|
+
flex: 1;
|
|
35
|
+
}
|
|
36
|
+
.gridui-u-form--basis-48 {
|
|
37
|
+
flex-basis: calc(var(--spacing) * 48);
|
|
38
|
+
}
|
|
39
|
+
.gridui-u-form--grid-cols-2 {
|
|
40
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
41
|
+
}
|
|
42
|
+
.gridui-u-form--flex-wrap {
|
|
43
|
+
flex-wrap: wrap;
|
|
44
|
+
}
|
|
45
|
+
.gridui-u-form--items-end {
|
|
46
|
+
align-items: flex-end;
|
|
47
|
+
}
|
|
48
|
+
.gridui-u-form--gap-gridui-8 {
|
|
49
|
+
gap: var(--gridui-space-8);
|
|
50
|
+
}
|
|
51
|
+
.gridui-u-form--gap-gridui-16 {
|
|
52
|
+
gap: var(--gridui-space-16);
|
|
53
|
+
}
|
|
54
|
+
.gridui-u-form--border-0 {
|
|
55
|
+
border-style: var(--tw-border-style);
|
|
56
|
+
border-width: 0px;
|
|
57
|
+
}
|
|
58
|
+
.gridui-u-form--p-0 {
|
|
59
|
+
padding: 0px;
|
|
60
|
+
}
|
|
61
|
+
.gridui-u-form--type-supporting {
|
|
62
|
+
font: var(--gridui-type-supporting);
|
|
63
|
+
font-family: var(--gridui-font-body);
|
|
64
|
+
letter-spacing: normal;
|
|
65
|
+
}
|
|
66
|
+
.gridui-u-form--wrap-anywhere {
|
|
67
|
+
overflow-wrap: anywhere;
|
|
68
|
+
}
|
|
69
|
+
.gridui-u-form--text-muted {
|
|
70
|
+
color: var(--gridui-muted);
|
|
71
|
+
}
|
|
72
|
+
.gridui-u-form--data-\[invalid\=\'true\'\]\:text-status-danger-text[data-invalid='true'] {
|
|
73
|
+
color: var(--gridui-status-danger-text);
|
|
74
|
+
}
|
|
75
|
+
:is(.gridui-u-form--\*\:data-\[span\=\'full\'\]\:col-span-full > *)[data-span='full'] {
|
|
76
|
+
grid-column: 1 / -1;
|
|
77
|
+
}
|
|
78
|
+
.gridui-u-form--\[\&\>legend\]\:mb-gridui-24 > legend {
|
|
79
|
+
margin-bottom: var(--gridui-space-24);
|
|
80
|
+
}
|
|
81
|
+
.gridui-u-form--\[\&\>legend\]\:p-0 > legend {
|
|
82
|
+
padding: 0px;
|
|
83
|
+
}
|
|
84
|
+
@media (max-width:24rem) {
|
|
85
|
+
.gridui-u-form--\[\@media\(max-width\:24rem\)\]\:grid-cols-\[1fr\] {
|
|
86
|
+
grid-template-columns: 1fr;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
@property --tw-border-style {
|
|
91
|
+
syntax: "*";
|
|
92
|
+
inherits: false;
|
|
93
|
+
initial-value: solid;
|
|
94
|
+
}
|
|
95
|
+
@layer properties {
|
|
96
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
97
|
+
*, ::before, ::after, ::backdrop {
|
|
98
|
+
--tw-border-style: solid;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
1
103
|
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
104
|
@layer theme, base, components, utilities;
|
|
3
105
|
@layer utilities;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer theme, base, components, utilities;
|
|
3
|
+
@layer utilities;
|
|
4
|
+
@layer components {
|
|
5
|
+
.gridui-slider {
|
|
6
|
+
position: relative;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
width: 100%;
|
|
11
|
+
min-height: 2.75rem;
|
|
12
|
+
touch-action: none;
|
|
13
|
+
user-select: none;
|
|
14
|
+
}
|
|
15
|
+
.gridui-slider[data-orientation="vertical"] {
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
width: 2.75rem;
|
|
18
|
+
height: 10rem;
|
|
19
|
+
}
|
|
20
|
+
.gridui-slider[data-disabled] {
|
|
21
|
+
opacity: 0.5;
|
|
22
|
+
}
|
|
23
|
+
.gridui-slider-track {
|
|
24
|
+
position: relative;
|
|
25
|
+
flex-grow: 1;
|
|
26
|
+
height: 0.25rem;
|
|
27
|
+
background: var(--gridui-surface);
|
|
28
|
+
}
|
|
29
|
+
.gridui-slider[data-orientation="vertical"] .gridui-slider-track {
|
|
30
|
+
width: 0.25rem;
|
|
31
|
+
height: 100%;
|
|
32
|
+
}
|
|
33
|
+
.gridui-slider-range {
|
|
34
|
+
position: absolute;
|
|
35
|
+
height: 100%;
|
|
36
|
+
background: var(--gridui-accent-background);
|
|
37
|
+
}
|
|
38
|
+
.gridui-slider[data-orientation="vertical"] .gridui-slider-range {
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: auto;
|
|
41
|
+
}
|
|
42
|
+
.gridui-slider-thumb {
|
|
43
|
+
display: block;
|
|
44
|
+
position: relative;
|
|
45
|
+
width: 1.25rem;
|
|
46
|
+
height: 1.25rem;
|
|
47
|
+
border: 1px solid var(--gridui-control-border);
|
|
48
|
+
border-radius: var(--gridui-control-radius);
|
|
49
|
+
background: var(--gridui-background);
|
|
50
|
+
cursor: grab;
|
|
51
|
+
}
|
|
52
|
+
.gridui-slider-thumb::after {
|
|
53
|
+
content: "";
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: -0.75rem;
|
|
56
|
+
}
|
|
57
|
+
.gridui-slider-thumb[data-disabled] {
|
|
58
|
+
cursor: not-allowed;
|
|
59
|
+
}
|
|
60
|
+
@media (forced-colors: active) {
|
|
61
|
+
.gridui-slider-track {
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
border: 1px solid CanvasText;
|
|
64
|
+
background: Canvas;
|
|
65
|
+
forced-color-adjust: none;
|
|
66
|
+
}
|
|
67
|
+
.gridui-slider-range {
|
|
68
|
+
background: Highlight;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
package/docs/catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"name": "@gridui/slider",
|
|
4
|
-
"version": "1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"category": "core",
|
|
6
6
|
"description": "GridUI React slider",
|
|
7
7
|
"usage": "Component reference contains focused API pages for each public component.",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"@gridui/form/styles.css",
|
|
28
28
|
"@gridui/slider/styles.css"
|
|
29
29
|
],
|
|
30
|
+
"styledImport": "@gridui/slider/styled",
|
|
30
31
|
"examples": [
|
|
32
|
+
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/slider/stories/getting-started.mdx",
|
|
31
33
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/slider/stories/values-ranges.mdx",
|
|
32
34
|
"https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/slider/stories/slider.stories.tsx"
|
|
33
35
|
]
|
package/docs/reference/slider.md
CHANGED
|
@@ -79,16 +79,6 @@ Prevents interaction when enabled.
|
|
|
79
79
|
|
|
80
80
|
Native form field name.
|
|
81
81
|
|
|
82
|
-
### onValueChange
|
|
83
|
-
|
|
84
|
-
``(value: number[]): void`` · Optional
|
|
85
|
-
|
|
86
|
-
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
87
|
-
|
|
88
|
-
### orientation
|
|
89
|
-
|
|
90
|
-
``("vertical" | "horizontal") | undefined`` · Optional
|
|
91
|
-
|
|
92
82
|
### max
|
|
93
83
|
|
|
94
84
|
``number | undefined`` · Optional
|
|
@@ -101,6 +91,16 @@ Default: ``100``
|
|
|
101
91
|
|
|
102
92
|
Default: ``0``
|
|
103
93
|
|
|
94
|
+
### orientation
|
|
95
|
+
|
|
96
|
+
``("vertical" | "horizontal") | undefined`` · Optional
|
|
97
|
+
|
|
98
|
+
### onValueChange
|
|
99
|
+
|
|
100
|
+
``(value: number[]): void`` · Optional
|
|
101
|
+
|
|
102
|
+
Called when the corresponding interaction occurs; inspect the arguments in Actions.
|
|
103
|
+
|
|
104
104
|
### inverted
|
|
105
105
|
|
|
106
106
|
``boolean | undefined`` · Optional
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/slider",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "GridUI React slider",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -10,14 +10,19 @@
|
|
|
10
10
|
"docs"
|
|
11
11
|
],
|
|
12
12
|
"sideEffects": [
|
|
13
|
-
"**/*.css"
|
|
13
|
+
"**/*.css",
|
|
14
|
+
"./dist/styled.js"
|
|
14
15
|
],
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./dist/index.d.ts",
|
|
18
19
|
"import": "./dist/index.js"
|
|
19
20
|
},
|
|
20
|
-
"./styles.css": "./dist/styles.css"
|
|
21
|
+
"./styles.css": "./dist/styles.css",
|
|
22
|
+
"./styled": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/styled.js"
|
|
25
|
+
}
|
|
21
26
|
},
|
|
22
27
|
"publishConfig": {
|
|
23
28
|
"access": "public"
|
|
@@ -27,15 +32,15 @@
|
|
|
27
32
|
"react-dom": "^19.2.0"
|
|
28
33
|
},
|
|
29
34
|
"dependencies": {
|
|
30
|
-
"@gridui/form": "^4.
|
|
35
|
+
"@gridui/form": "^4.2.0",
|
|
31
36
|
"@gridui/style-utils": "^4.0.0",
|
|
32
|
-
"@gridui/theme": "^
|
|
37
|
+
"@gridui/theme": "^4.0.0",
|
|
33
38
|
"@radix-ui/react-slider": "1.6.1"
|
|
34
39
|
},
|
|
35
40
|
"devDependencies": {
|
|
36
41
|
"@gridui-internal/configuration": "0.0.0-internal",
|
|
37
42
|
"@jest/globals": "30.5.2",
|
|
38
|
-
"@storybook/react-vite": "10.6.
|
|
43
|
+
"@storybook/react-vite": "10.6.7",
|
|
39
44
|
"@types/jest": "30.0.0",
|
|
40
45
|
"@types/node": "26.6.6",
|
|
41
46
|
"@types/react": "19.3.0",
|
|
@@ -48,7 +53,6 @@
|
|
|
48
53
|
"scripts": {
|
|
49
54
|
"build": "node ../../scripts/compilation/package.ts",
|
|
50
55
|
"compile": "tsc --project tsconfig.json",
|
|
51
|
-
"test": "jest"
|
|
52
|
-
"coverage": "jest --coverage"
|
|
56
|
+
"test": "jest"
|
|
53
57
|
}
|
|
54
58
|
}
|