@gridui/slider 1.0.7 → 1.0.8

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 CHANGED
@@ -6,3 +6,5 @@ Import components from `@gridui/slider` and load `@gridui/slider/styles.css` aft
6
6
  Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
7
7
 
8
8
  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
+
10
+ [Component reference](docs/reference/README.md) contains focused API pages for each public component.
package/dist/styles.css CHANGED
@@ -57,4 +57,15 @@
57
57
  .gridui-slider-thumb[data-disabled] {
58
58
  cursor: not-allowed;
59
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
+ }
60
71
  }
package/docs/catalog.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/slider",
4
- "version": "1.0.7",
4
+ "version": "1.0.8",
5
5
  "category": "core",
6
6
  "description": "GridUI React slider",
7
- "usage": "GridUI React slider",
7
+ "usage": "Component reference contains focused API pages for each public component.",
8
8
  "documentation": [
9
- "README.md"
9
+ "README.md",
10
+ "docs/reference/README.md",
11
+ "docs/reference/slider.md"
10
12
  ],
11
13
  "exports": [
12
14
  {
@@ -0,0 +1,4 @@
1
+ <!-- Generated by pnpm docs:storybook. -->
2
+ # Component reference
3
+
4
+ - [Slider](slider.md)
@@ -0,0 +1,145 @@
1
+ <!-- Generated from public Props and owned stories. Run pnpm docs:storybook. -->
2
+ # Slider
3
+
4
+ Adjusts a numeric value along a bounded track. Use it for values that benefit from direct spatial adjustment.
5
+
6
+ Import from ``@gridui/slider`` and load Theme before this family's stylesheet.
7
+
8
+ ```tsx
9
+ import { Slider } from "@gridui/slider";
10
+ import "@gridui/theme/styles.css";
11
+ import "@gridui/slider/styles.css";
12
+ ```
13
+
14
+ Read the [package contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/slider/README.md) for shared behavior and stylesheet dependencies.
15
+
16
+ The [working composition](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/slider/stories/slider.stories.tsx) demonstrates required context, state, and related components. Use View code in Storybook to inspect the actual implementation.
17
+
18
+ ## API
19
+
20
+ The public Props type is the source of these signatures. Defaults below are explicit implementation defaults; story presets are separate. Native attributes remain available through the exported Props type.
21
+
22
+ ### form
23
+
24
+ ``string | undefined`` · Optional
25
+
26
+ ### step
27
+
28
+ ``number | undefined`` · Optional
29
+
30
+ Default: ``1``
31
+
32
+ ### dir
33
+
34
+ ``("ltr" | "rtl") | undefined`` · Optional
35
+
36
+ ### onFocus
37
+
38
+ ``(event: FocusEvent<HTMLSpanElement, Element>): void`` · Optional
39
+
40
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
41
+
42
+ ### onBlur
43
+
44
+ ``(event: FocusEvent<HTMLSpanElement, Element>): void`` · Optional
45
+
46
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
47
+
48
+ ### onChange
49
+
50
+ ``(event: ChangeEvent<HTMLSpanElement, Element>): void`` · Optional
51
+
52
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
53
+
54
+ ### onSubmit
55
+
56
+ ``(event: SubmitEvent<HTMLSpanElement>): void`` · Optional
57
+
58
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
59
+
60
+ ### onClick
61
+
62
+ ``(event: MouseEvent<HTMLSpanElement, MouseEvent>): void`` · Optional
63
+
64
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
65
+
66
+ ### asChild
67
+
68
+ ``boolean | undefined`` · Optional
69
+
70
+ ### disabled
71
+
72
+ ``boolean | undefined`` · Optional
73
+
74
+ Prevents interaction when enabled.
75
+
76
+ ### name
77
+
78
+ ``string | undefined`` · Optional
79
+
80
+ Native form field name.
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
+ ### max
93
+
94
+ ``number | undefined`` · Optional
95
+
96
+ Default: ``100``
97
+
98
+ ### min
99
+
100
+ ``number | undefined`` · Optional
101
+
102
+ Default: ``0``
103
+
104
+ ### inverted
105
+
106
+ ``boolean | undefined`` · Optional
107
+
108
+ ### minStepsBetweenThumbs
109
+
110
+ ``number | undefined`` · Optional
111
+
112
+ ### preserveThumbOrder
113
+
114
+ ``boolean | undefined`` · Optional
115
+
116
+ When `true`, thumbs keep their relative order and won't cross over one
117
+ another while dragging. Each thumb is constrained to the values of its
118
+ neighbors instead of swapping positions when dragged past them.
119
+
120
+ ### onValueCommit
121
+
122
+ ``(value: number[]): void`` · Optional
123
+
124
+ Called when the corresponding interaction occurs; inspect the arguments in Actions.
125
+
126
+ ### value
127
+
128
+ ``readonly number[] | undefined`` · Optional
129
+
130
+ Controlled value. Pair with the corresponding change callback.
131
+
132
+ ### defaultValue
133
+
134
+ ``readonly number[] | undefined`` · Optional
135
+
136
+ Initial uncontrolled value. Reset the story after changing it.
137
+
138
+ ### thumbLabels
139
+
140
+ ``readonly string[]`` · Required
141
+
142
+ ### getValueText
143
+
144
+ ``((value: number, index: number) => string) | undefined`` · Optional
145
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/slider",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "GridUI React slider",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "react-dom": "^19.2.0"
28
28
  },
29
29
  "dependencies": {
30
- "@gridui/form": "^4.0.0",
30
+ "@gridui/form": "^4.1.0",
31
31
  "@gridui/style-utils": "^3.0.0",
32
32
  "@gridui/theme": "^2.5.3",
33
33
  "@radix-ui/react-slider": "1.6.1"