@manakind/ui-core 0.36.0 → 0.38.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 CHANGED
@@ -94,6 +94,7 @@ separately, so an app can load only what it renders.
94
94
  | `@manakind/ui-core/radio-group` | `RadioGroup` |
95
95
  | `@manakind/ui-core/scroll-area` | `ScrollArea` |
96
96
  | `@manakind/ui-core/status-dot` | `StatusDot`; a dot that marks something unread, live or new, with its meaning in words for assistive technology |
97
+ | `@manakind/ui-core/stepper` | `Stepper`; a row of numbered steps showing how far through a flow the reader is, complete steps checked and the current one outlined |
97
98
  | `@manakind/ui-core/sticky` | `Sticky` |
98
99
  | `@manakind/ui-core/empty-state` | `EmptyState` |
99
100
  | `@manakind/ui-core/page-layout` | `PageLayout`, `PageHeader`, `PageTitle`, `PageDescription`, `PageActions` |
@@ -141,6 +142,7 @@ separately, so an app can load only what it renders.
141
142
  | `@manakind/ui-core/css/radio-group` | RadioGroup structural CSS |
142
143
  | `@manakind/ui-core/css/scroll-area` | ScrollArea structural CSS |
143
144
  | `@manakind/ui-core/css/status-dot` | StatusDot structural CSS; its label also needs `css/visually-hidden` |
145
+ | `@manakind/ui-core/css/stepper` | Stepper structural CSS; a complete step's word also needs `css/visually-hidden`, its check `css/icon` |
144
146
  | `@manakind/ui-core/css/sticky` | Sticky structural CSS |
145
147
  | `@manakind/ui-core/css/empty-state` | EmptyState structural CSS; its glyph also needs `css/icon` |
146
148
  | `@manakind/ui-core/css/page-layout` | PageLayout structural CSS; its title and description also need `css/text` |
package/dist/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export * from './slider';
41
41
  export * from './spinner';
42
42
  export * from './split-layout';
43
43
  export * from './status-dot';
44
+ export * from './stepper';
44
45
  export * from './sticky';
45
46
  export * from './switch';
46
47
  export * from './table';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aA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YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -40,6 +40,7 @@ export * from './slider';
40
40
  export * from './spinner';
41
41
  export * from './split-layout';
42
42
  export * from './status-dot';
43
+ export * from './stepper';
43
44
  export * from './sticky';
44
45
  export * from './switch';
45
46
  export * from './table';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,KAAK,IAAI,aAAa,EACtB,WAAW,IAAI,mBAAmB,EAClC,YAAY,IAAI,oBAAoB,EACpC,KAAK,IAAI,aAAa,EACtB,GAAG,IAAI,WAAW,GACnB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './accordion';\nexport * from './alert';\nexport * from './avatar';\nexport * from './badge';\nexport * from './breadcrumb';\nexport * from './button';\nexport * from './calendar';\nexport * from './card';\nexport * from './centered-layout';\nexport * from './checkbox';\nexport * from './combobox';\nexport { cx } from './cx';\nexport * from './date-input';\nexport * from './dialog';\nexport * from './divider';\nexport * from './empty-state';\nexport {\n Check as FallbackCheck,\n ChevronLeft as FallbackChevronLeft,\n ChevronRight as FallbackChevronRight,\n Cross as FallbackCross,\n Pin as FallbackPin,\n} from './fallback-glyphs';\nexport * from './field';\nexport * from './form-layout';\nexport * from './icon';\nexport * from './icon-defaults';\nexport * from './illustration';\nexport * from './layout';\nexport * from './link';\nexport type { LinkComponentProps } from './link-component';\nexport * from './menu';\nexport * from './nav-list';\nexport * from './page-layout';\nexport * from './popover';\nexport * from './progress';\nexport * from './radio-group';\nexport * from './reorder-control';\nexport * from './scroll-area';\nexport * from './section';\nexport * from './segment-group';\nexport * from './select';\nexport * from './show';\nexport * from './side-panel-layout';\nexport * from './skeleton';\nexport * from './slider';\nexport * from './spinner';\nexport * from './split-layout';\nexport * from './status-dot';\nexport * from './sticky';\nexport * from './switch';\nexport * from './table';\nexport * from './tabs';\nexport * from './text';\nexport * from './tooltip';\nexport * from './visually-hidden';\nexport * from './wizard-layout';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,OAAO,EACL,KAAK,IAAI,aAAa,EACtB,WAAW,IAAI,mBAAmB,EAClC,YAAY,IAAI,oBAAoB,EACpC,KAAK,IAAI,aAAa,EACtB,GAAG,IAAI,WAAW,GACnB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AAEvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC","sourcesContent":["export * from './accordion';\nexport * from './alert';\nexport * from './avatar';\nexport * from './badge';\nexport * from './breadcrumb';\nexport * from './button';\nexport * from './calendar';\nexport * from './card';\nexport * from './centered-layout';\nexport * from './checkbox';\nexport * from './combobox';\nexport { cx } from './cx';\nexport * from './date-input';\nexport * from './dialog';\nexport * from './divider';\nexport * from './empty-state';\nexport {\n Check as FallbackCheck,\n ChevronLeft as FallbackChevronLeft,\n ChevronRight as FallbackChevronRight,\n Cross as FallbackCross,\n Pin as FallbackPin,\n} from './fallback-glyphs';\nexport * from './field';\nexport * from './form-layout';\nexport * from './icon';\nexport * from './icon-defaults';\nexport * from './illustration';\nexport * from './layout';\nexport * from './link';\nexport type { LinkComponentProps } from './link-component';\nexport * from './menu';\nexport * from './nav-list';\nexport * from './page-layout';\nexport * from './popover';\nexport * from './progress';\nexport * from './radio-group';\nexport * from './reorder-control';\nexport * from './scroll-area';\nexport * from './section';\nexport * from './segment-group';\nexport * from './select';\nexport * from './show';\nexport * from './side-panel-layout';\nexport * from './skeleton';\nexport * from './slider';\nexport * from './spinner';\nexport * from './split-layout';\nexport * from './status-dot';\nexport * from './stepper';\nexport * from './sticky';\nexport * from './switch';\nexport * from './table';\nexport * from './tabs';\nexport * from './text';\nexport * from './tooltip';\nexport * from './visually-hidden';\nexport * from './wizard-layout';\n"]}
@@ -67,4 +67,58 @@
67
67
  }
68
68
  }
69
69
  }
70
+
71
+ /*
72
+ * Cards: the label above a grid of choices that fills the width and wraps.
73
+ * Each card is the whole click target; the hidden radio inside it carries
74
+ * the state and the keyboard. Chosen, the card's border thickens into a
75
+ * ring in the checked colour, so the choice reads by weight as well as
76
+ * colour; keyboard focus is the focus ring drawn outside it.
77
+ */
78
+ .ds-radio-group--cards {
79
+ align-items: stretch;
80
+
81
+ & .ds-radio-group__cards {
82
+ display: grid;
83
+ grid-template-columns: repeat(auto-fill, minmax(var(--ds-radio-group-card-min-width), 1fr));
84
+ gap: var(--ds-radio-group-card-gap);
85
+ }
86
+
87
+ & .ds-radio-group__item {
88
+ box-sizing: border-box;
89
+ flex-direction: column;
90
+ justify-content: center;
91
+ gap: var(--ds-radio-group-card-gap);
92
+ padding: var(--ds-radio-group-card-padding);
93
+ border: 1px solid var(--ds-radio-group-card-border);
94
+ border-radius: var(--ds-radio-group-card-radius);
95
+ background-color: var(--ds-radio-group-card-bg);
96
+ text-align: center;
97
+ transition: border-color 150ms cubic-bezier(0, 0, 0.2, 1);
98
+
99
+ &[data-hover]:not([data-disabled], [data-state="checked"]) {
100
+ border-color: var(--ds-radio-group-card-border-hover);
101
+ }
102
+
103
+ /* The border thickens inward: the padding gives back what it takes, so nothing shifts. */
104
+ &[data-state="checked"] {
105
+ padding: calc(var(--ds-radio-group-card-padding) - 1px);
106
+ border: 2px solid var(--ds-radio-group-card-border-checked);
107
+ }
108
+
109
+ &[data-focus-visible] {
110
+ outline: 2px solid var(--ds-radio-group-focus-ring);
111
+ outline-offset: 2px;
112
+ }
113
+
114
+ &[data-disabled] {
115
+ opacity: var(--ds-opacity-disabled);
116
+ }
117
+ }
118
+
119
+ & .ds-radio-group__visual {
120
+ display: flex;
121
+ justify-content: center;
122
+ }
123
+ }
70
124
  }
@@ -7,7 +7,15 @@ export interface RadioGroupItem {
7
7
  label: string;
8
8
  /** Individually disable this choice without removing it. */
9
9
  disabled?: boolean;
10
+ /**
11
+ * A picture of the choice, above its label on a `cards` group: a swatch,
12
+ * a badge, a preview. Decorative: the label names the choice. A `list`
13
+ * group ignores it.
14
+ */
15
+ visual?: ReactNode;
10
16
  }
17
+ /** `list` (default) sets radios one under the other; `cards` sets each choice on a card in a wrapping grid. */
18
+ export type RadioGroupAppearance = 'list' | 'cards';
11
19
  /**
12
20
  * A radio group has to have a name, expressed as a union so an unnamed group
13
21
  * is a compile error rather than an axe finding, as `SegmentGroup` does.
@@ -26,8 +34,16 @@ type RadioGroupName = {
26
34
  'aria-label': string;
27
35
  };
28
36
  export type RadioGroupProps = RadioGroupName & {
29
- /** The choices, in order, one under the other. */
37
+ /** The choices, in order. */
30
38
  items: RadioGroupItem[];
39
+ /**
40
+ * `list` (default) sets a radio beside each label, one under the other.
41
+ * `cards` sets each choice on a card, its `visual` above its label, in a
42
+ * grid that fills the width and wraps; the chosen card carries a heavier
43
+ * ring instead of a radio. For choices told apart by how they look, such
44
+ * as colours or themes.
45
+ */
46
+ appearance?: RadioGroupAppearance;
31
47
  /**
32
48
  * Controlled value. `null` is controlled with nothing chosen; `undefined`
33
49
  * leaves the component to own its value from `defaultValue` onward.
@@ -66,9 +82,11 @@ export type RadioGroupProps = RadioGroupName & {
66
82
  * />
67
83
  * ```
68
84
  *
69
- * A few short choices seen at once in a row are a `SegmentGroup`; a long
70
- * list, or one in a form row, is a `Select`.
85
+ * Choices told apart by how they look (a colour, a theme) take
86
+ * `appearance="cards"`, each with a `visual`. A few short choices seen at
87
+ * once in a row are a `SegmentGroup`; a long list, or one in a form row, is
88
+ * a `Select`.
71
89
  */
72
- export declare function RadioGroup({ label, items, value, defaultValue, onValueChange, disabled, name, className, 'aria-label': ariaLabel, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
90
+ export declare function RadioGroup({ label, items, value, defaultValue, onValueChange, disabled, name, appearance, className, 'aria-label': ariaLabel, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
73
91
  export {};
74
92
  //# sourceMappingURL=radio-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/radio-group/radio-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAC/C,OAAO,mBAAmB,CAAC;AAI3B,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,KAAK,cAAc,GACf;IACE,0DAA0D;IAC1D,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GACD;IACE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mGAAmG;IACnG,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC7C,kDAAkD;IAClD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,YAAY,EAAE,SAAS,GACxB,EAAE,eAAe,2CAwCjB"}
1
+ {"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/radio-group/radio-group.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAC/C,OAAO,mBAAmB,CAAC;AAI3B,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,+GAA+G;AAC/G,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD;;;GAGG;AACH,KAAK,cAAc,GACf;IACE,0DAA0D;IAC1D,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GACD;IACE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,mGAAmG;IACnG,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,eAAe,GAAG,cAAc,GAAG;IAC7C,6BAA6B;IAC7B,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,KAAK,EACL,KAAK,EACL,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,IAAI,EACJ,UAAmB,EACnB,SAAS,EACT,YAAY,EAAE,SAAS,GACxB,EAAE,eAAe,2CAuDjB"}
@@ -26,10 +26,13 @@ import { cx } from '../cx';
26
26
  * />
27
27
  * ```
28
28
  *
29
- * A few short choices seen at once in a row are a `SegmentGroup`; a long
30
- * list, or one in a form row, is a `Select`.
29
+ * Choices told apart by how they look (a colour, a theme) take
30
+ * `appearance="cards"`, each with a `visual`. A few short choices seen at
31
+ * once in a row are a `SegmentGroup`; a long list, or one in a form row, is
32
+ * a `Select`.
31
33
  */
32
- export function RadioGroup({ label, items, value, defaultValue, onValueChange, disabled, name, className, 'aria-label': ariaLabel, }) {
34
+ export function RadioGroup({ label, items, value, defaultValue, onValueChange, disabled, name, appearance = 'list', className, 'aria-label': ariaLabel, }) {
35
+ const cards = appearance === 'cards';
33
36
  const rootRef = useRef(null);
34
37
  const handleValueChange = radioGroupChangeHandler(rootRef, value, onValueChange);
35
38
  const visibleLabel = renderVisibleLabel(ArkRadioGroup.Label, {
@@ -37,7 +40,9 @@ export function RadioGroup({ label, items, value, defaultValue, onValueChange, d
37
40
  ariaLabel,
38
41
  className: 'ds-radio-group__label',
39
42
  });
40
- const renderItem = (item) => (_jsxs(ArkRadioGroup.Item, { value: item.value, disabled: item.disabled, className: "ds-radio-group__item", children: [_jsx(ArkRadioGroup.ItemControl, { className: "ds-radio-group__control" }), _jsx(ArkRadioGroup.ItemText, { className: "ds-radio-group__text", children: item.label }), _jsx(ArkRadioGroup.ItemHiddenInput, {})] }, item.value));
41
- return (_jsxs(ArkRadioGroup.Root, { ref: rootRef, className: cx('ds-radio-group', className), value: value, defaultValue: defaultValue, onValueChange: handleValueChange, disabled: disabled, name: name, orientation: "vertical", "aria-label": ariaLabel, children: [visibleLabel, items.map(renderItem)] }));
43
+ const marker = (item) => cards ? (_jsx("span", { className: "ds-radio-group__visual", "aria-hidden": true, children: item.visual })) : (_jsx(ArkRadioGroup.ItemControl, { className: "ds-radio-group__control" }));
44
+ const renderItem = (item) => (_jsxs(ArkRadioGroup.Item, { value: item.value, disabled: item.disabled, className: "ds-radio-group__item", children: [marker(item), _jsx(ArkRadioGroup.ItemText, { className: "ds-radio-group__text", children: item.label }), _jsx(ArkRadioGroup.ItemHiddenInput, {})] }, item.value));
45
+ const choices = cards ? (_jsx("div", { className: "ds-radio-group__cards", children: items.map(renderItem) })) : (items.map(renderItem));
46
+ return (_jsxs(ArkRadioGroup.Root, { ref: rootRef, className: cx('ds-radio-group', cards && 'ds-radio-group--cards', className), value: value, defaultValue: defaultValue, onValueChange: handleValueChange, disabled: disabled, name: name, orientation: "vertical", "aria-label": ariaLabel, children: [visibleLabel, choices] }));
42
47
  }
43
48
  //# sourceMappingURL=radio-group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/radio-group/radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,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AAY,EAC1B,aAAa,EAAE,iBAAiB,EAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,WAAW,EAAC,UAAU,gBACV,SAAS,aAEpB,YAAY,EACZ,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,IACH,CACtB,CAAC;AACJ,CAAC","sourcesContent":["import { RadioGroup as ArkRadioGroup } from '@ark-ui/react/radio-group';\nimport { type ReactNode, useRef } from 'react';\nimport './radio-group.css';\nimport { radioGroupChangeHandler, renderVisibleLabel } from '../ark-native-input';\nimport { cx } from '../cx';\n\nexport interface RadioGroupItem {\n /** Stable value reported by `onValueChange` and compared with `value`. */\n value: string;\n /** Text beside the radio. The whole row is its click target. */\n label: string;\n /** Individually disable this choice without removing it. */\n disabled?: boolean;\n}\n\n/**\n * A radio group has to have a name, expressed as a union so an unnamed group\n * is a compile error rather than an axe finding, as `SegmentGroup` does.\n */\ntype RadioGroupName =\n | {\n /** Visible label, above the choices, naming the group. */\n label: ReactNode;\n /**\n * A different accessible name when the visible label alone would not\n * say what the choice is. Keep the visible words in it.\n */\n 'aria-label'?: string;\n }\n | {\n label?: undefined;\n /** Accessible name when a heading or a section title around it already says what the choice is. */\n 'aria-label': string;\n };\n\nexport type RadioGroupProps = RadioGroupName & {\n /** The choices, in order, one under the other. */\n items: RadioGroupItem[];\n /**\n * Controlled value. `null` is controlled with nothing chosen; `undefined`\n * leaves the component to own its value from `defaultValue` onward.\n */\n value?: string | null;\n /** Initial value when uncontrolled. */\n defaultValue?: string;\n /** Fired with the newly chosen value. Choosing the chosen one again does nothing. */\n onValueChange?: (value: string) => void;\n /** Disable every choice. The chosen one keeps showing which is set. */\n disabled?: boolean;\n /** Name for native form participation through the radio inputs. */\n name?: string;\n /** Extra class names appended after `ds-radio-group`. */\n className?: string;\n};\n\n/**\n * One choice among several, as a column of radios, built on Ark UI's\n * RadioGroup: a filter's period, a setting with a handful of options whose\n * labels are worth reading side by side.\n *\n * Ark owns the behaviour: native radio inputs carry the state, the arrow keys\n * move the choice and Tab leaves the group in one step. This wrapper\n * contributes `ds-` classes, the `--ds-radio-group-*` bindings and a flat\n * `items` API.\n *\n * ```tsx\n * <RadioGroup\n * aria-label=\"Scheduled in\"\n * items={[\n * { value: 'any', label: 'Any time' },\n * { value: 'this-week', label: 'This week' },\n * ]}\n * value={when}\n * onValueChange={setWhen}\n * />\n * ```\n *\n * A few short choices seen at once in a row are a `SegmentGroup`; a long\n * list, or one in a form row, is a `Select`.\n */\nexport function RadioGroup({\n label,\n items,\n value,\n defaultValue,\n onValueChange,\n disabled,\n name,\n className,\n 'aria-label': ariaLabel,\n}: RadioGroupProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n\n const handleValueChange = radioGroupChangeHandler(rootRef, value, onValueChange);\n\n const visibleLabel = renderVisibleLabel(ArkRadioGroup.Label, {\n label,\n ariaLabel,\n className: 'ds-radio-group__label',\n });\n\n const renderItem = (item: RadioGroupItem) => (\n <ArkRadioGroup.Item\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n className=\"ds-radio-group__item\"\n >\n <ArkRadioGroup.ItemControl className=\"ds-radio-group__control\" />\n <ArkRadioGroup.ItemText className=\"ds-radio-group__text\">{item.label}</ArkRadioGroup.ItemText>\n <ArkRadioGroup.ItemHiddenInput />\n </ArkRadioGroup.Item>\n );\n\n return (\n <ArkRadioGroup.Root\n ref={rootRef}\n className={cx('ds-radio-group', className)}\n value={value}\n defaultValue={defaultValue}\n onValueChange={handleValueChange}\n disabled={disabled}\n name={name}\n orientation=\"vertical\"\n aria-label={ariaLabel}\n >\n {visibleLabel}\n {items.map(renderItem)}\n </ArkRadioGroup.Root>\n );\n}\n"]}
1
+ {"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../src/radio-group/radio-group.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAkB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,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aAAa,CAAC,eAAe,KAAG,KAP5B,IAAI,CAAC,KAAK,CAQI,CACtB,CAAC;IAEF,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CACtB,cAAK,SAAS,EAAC,uBAAuB,YAAE,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,GAAO,CACrE,CAAC,CAAC,CAAC,CACF,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CACtB,CAAC;IAEF,OAAO,CACL,MAAC,aAAa,CAAC,IAAI,IACjB,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,KAAK,IAAI,uBAAuB,EAAE,SAAS,CAAC,EAC5E,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,iBAAiB,EAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,WAAW,EAAC,UAAU,gBACV,SAAS,aAEpB,YAAY,EACZ,OAAO,IACW,CACtB,CAAC;AACJ,CAAC","sourcesContent":["import { RadioGroup as ArkRadioGroup } from '@ark-ui/react/radio-group';\nimport { type ReactNode, useRef } from 'react';\nimport './radio-group.css';\nimport { radioGroupChangeHandler, renderVisibleLabel } from '../ark-native-input';\nimport { cx } from '../cx';\n\nexport interface RadioGroupItem {\n /** Stable value reported by `onValueChange` and compared with `value`. */\n value: string;\n /** Text beside the radio. The whole row is its click target. */\n label: string;\n /** Individually disable this choice without removing it. */\n disabled?: boolean;\n /**\n * A picture of the choice, above its label on a `cards` group: a swatch,\n * a badge, a preview. Decorative: the label names the choice. A `list`\n * group ignores it.\n */\n visual?: ReactNode;\n}\n\n/** `list` (default) sets radios one under the other; `cards` sets each choice on a card in a wrapping grid. */\nexport type RadioGroupAppearance = 'list' | 'cards';\n\n/**\n * A radio group has to have a name, expressed as a union so an unnamed group\n * is a compile error rather than an axe finding, as `SegmentGroup` does.\n */\ntype RadioGroupName =\n | {\n /** Visible label, above the choices, naming the group. */\n label: ReactNode;\n /**\n * A different accessible name when the visible label alone would not\n * say what the choice is. Keep the visible words in it.\n */\n 'aria-label'?: string;\n }\n | {\n label?: undefined;\n /** Accessible name when a heading or a section title around it already says what the choice is. */\n 'aria-label': string;\n };\n\nexport type RadioGroupProps = RadioGroupName & {\n /** The choices, in order. */\n items: RadioGroupItem[];\n /**\n * `list` (default) sets a radio beside each label, one under the other.\n * `cards` sets each choice on a card, its `visual` above its label, in a\n * grid that fills the width and wraps; the chosen card carries a heavier\n * ring instead of a radio. For choices told apart by how they look, such\n * as colours or themes.\n */\n appearance?: RadioGroupAppearance;\n /**\n * Controlled value. `null` is controlled with nothing chosen; `undefined`\n * leaves the component to own its value from `defaultValue` onward.\n */\n value?: string | null;\n /** Initial value when uncontrolled. */\n defaultValue?: string;\n /** Fired with the newly chosen value. Choosing the chosen one again does nothing. */\n onValueChange?: (value: string) => void;\n /** Disable every choice. The chosen one keeps showing which is set. */\n disabled?: boolean;\n /** Name for native form participation through the radio inputs. */\n name?: string;\n /** Extra class names appended after `ds-radio-group`. */\n className?: string;\n};\n\n/**\n * One choice among several, as a column of radios, built on Ark UI's\n * RadioGroup: a filter's period, a setting with a handful of options whose\n * labels are worth reading side by side.\n *\n * Ark owns the behaviour: native radio inputs carry the state, the arrow keys\n * move the choice and Tab leaves the group in one step. This wrapper\n * contributes `ds-` classes, the `--ds-radio-group-*` bindings and a flat\n * `items` API.\n *\n * ```tsx\n * <RadioGroup\n * aria-label=\"Scheduled in\"\n * items={[\n * { value: 'any', label: 'Any time' },\n * { value: 'this-week', label: 'This week' },\n * ]}\n * value={when}\n * onValueChange={setWhen}\n * />\n * ```\n *\n * Choices told apart by how they look (a colour, a theme) take\n * `appearance=\"cards\"`, each with a `visual`. A few short choices seen at\n * once in a row are a `SegmentGroup`; a long list, or one in a form row, is\n * a `Select`.\n */\nexport function RadioGroup({\n label,\n items,\n value,\n defaultValue,\n onValueChange,\n disabled,\n name,\n appearance = 'list',\n className,\n 'aria-label': ariaLabel,\n}: RadioGroupProps) {\n const cards = appearance === 'cards';\n const rootRef = useRef<HTMLDivElement>(null);\n\n const handleValueChange = radioGroupChangeHandler(rootRef, value, onValueChange);\n\n const visibleLabel = renderVisibleLabel(ArkRadioGroup.Label, {\n label,\n ariaLabel,\n className: 'ds-radio-group__label',\n });\n\n const marker = (item: RadioGroupItem) =>\n cards ? (\n <span className=\"ds-radio-group__visual\" aria-hidden>\n {item.visual}\n </span>\n ) : (\n <ArkRadioGroup.ItemControl className=\"ds-radio-group__control\" />\n );\n const renderItem = (item: RadioGroupItem) => (\n <ArkRadioGroup.Item\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n className=\"ds-radio-group__item\"\n >\n {marker(item)}\n <ArkRadioGroup.ItemText className=\"ds-radio-group__text\">{item.label}</ArkRadioGroup.ItemText>\n <ArkRadioGroup.ItemHiddenInput />\n </ArkRadioGroup.Item>\n );\n\n const choices = cards ? (\n <div className=\"ds-radio-group__cards\">{items.map(renderItem)}</div>\n ) : (\n items.map(renderItem)\n );\n\n return (\n <ArkRadioGroup.Root\n ref={rootRef}\n className={cx('ds-radio-group', cards && 'ds-radio-group--cards', className)}\n value={value}\n defaultValue={defaultValue}\n onValueChange={handleValueChange}\n disabled={disabled}\n name={name}\n orientation=\"vertical\"\n aria-label={ariaLabel}\n >\n {visibleLabel}\n {choices}\n </ArkRadioGroup.Root>\n );\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export type { StepperProps } from './stepper';
2
+ export { Stepper } from './stepper';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stepper/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Stepper } from './stepper';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/stepper/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type { StepperProps } from './stepper';\nexport { Stepper } from './stepper';\n"]}
@@ -0,0 +1,169 @@
1
+ @layer components {
2
+ .ds-stepper {
3
+ container: ds-stepper / inline-size;
4
+ display: flex;
5
+ flex-direction: column;
6
+ gap: var(--ds-stepper-gap);
7
+ }
8
+
9
+ /*
10
+ * The steps share the row evenly. Each spans the same two rows (marker,
11
+ * name) through subgrid, so a name that wraps never pushes its marker off
12
+ * the line.
13
+ */
14
+ .ds-stepper__list {
15
+ display: grid;
16
+ grid-template-rows: repeat(2, auto);
17
+ grid-auto-columns: minmax(0, 1fr);
18
+ grid-auto-flow: column;
19
+ row-gap: var(--ds-stepper-gap);
20
+ margin: 0;
21
+ padding: 0;
22
+ list-style: none;
23
+ }
24
+
25
+ .ds-stepper__step {
26
+ position: relative;
27
+ display: grid;
28
+ grid-row: span 2;
29
+ grid-template-rows: subgrid;
30
+ justify-items: center;
31
+ row-gap: var(--ds-stepper-gap);
32
+ min-inline-size: 0;
33
+ text-align: center;
34
+ }
35
+
36
+ /*
37
+ * The line joins each marker to the next and stops at their edges, so no
38
+ * marker needs a fill to hide it: every step draws its half on each side,
39
+ * except the first's start and the last's end.
40
+ */
41
+ .ds-stepper__track {
42
+ --_reach: calc(50% + var(--ds-stepper-marker-size) / 2);
43
+
44
+ position: relative;
45
+ display: flex;
46
+ justify-content: center;
47
+ justify-self: stretch;
48
+
49
+ &::before,
50
+ &::after {
51
+ content: "";
52
+ position: absolute;
53
+ inset-block-start: calc(50% - var(--ds-stepper-line-width) / 2);
54
+ block-size: var(--ds-stepper-line-width);
55
+ background-color: var(--ds-stepper-line);
56
+ }
57
+
58
+ &::before {
59
+ inset-inline: 0 var(--_reach);
60
+ }
61
+
62
+ &::after {
63
+ inset-inline: var(--_reach) 0;
64
+ }
65
+ }
66
+
67
+ .ds-stepper__step:first-child .ds-stepper__track::before,
68
+ .ds-stepper__step:last-child .ds-stepper__track::after {
69
+ content: none;
70
+ }
71
+
72
+ /*
73
+ * Only a complete marker fills, and only the current one draws a ring;
74
+ * the steps ahead show their number alone.
75
+ */
76
+ .ds-stepper__marker {
77
+ box-sizing: border-box;
78
+ position: relative;
79
+ display: grid;
80
+ place-items: center;
81
+ inline-size: var(--ds-stepper-marker-size);
82
+ block-size: var(--ds-stepper-marker-size);
83
+ border: var(--ds-stepper-line-width) solid transparent;
84
+ border-radius: 50%;
85
+ color: var(--ds-stepper-marker-text);
86
+ font-size: var(--ds-stepper-label-font-size);
87
+ font-variant-numeric: tabular-nums;
88
+ }
89
+
90
+ .ds-stepper__step--complete .ds-stepper__marker {
91
+ border-color: var(--ds-stepper-complete-bg);
92
+ background-color: var(--ds-stepper-complete-bg);
93
+ color: var(--ds-stepper-complete-text);
94
+ }
95
+
96
+ .ds-stepper__step--current .ds-stepper__marker {
97
+ border-color: var(--ds-stepper-marker-ring);
98
+ color: var(--ds-stepper-marker-text-strong);
99
+ font-weight: var(--ds-stepper-label-font-weight-strong);
100
+ }
101
+
102
+ .ds-stepper__label {
103
+ max-inline-size: 100%;
104
+ color: var(--ds-stepper-label-text);
105
+ font-size: var(--ds-stepper-label-font-size);
106
+ overflow-wrap: anywhere;
107
+ }
108
+
109
+ .ds-stepper__step--current .ds-stepper__label {
110
+ font-weight: var(--ds-stepper-label-font-weight-strong);
111
+ }
112
+
113
+ .ds-stepper__step--upcoming .ds-stepper__label {
114
+ color: var(--ds-stepper-label-text-muted);
115
+ }
116
+
117
+ /* Wide, every step's name sits under its marker, so the caption is not needed. */
118
+ .ds-stepper__caption {
119
+ display: none;
120
+ margin: 0;
121
+ color: var(--ds-stepper-label-text);
122
+ font-size: var(--ds-stepper-label-font-size);
123
+ font-weight: var(--ds-stepper-label-font-weight-strong);
124
+ overflow-wrap: anywhere;
125
+ }
126
+
127
+ /*
128
+ * Narrow, a column is too slim for a name: the row keeps only its markers
129
+ * and the current step's name shows on the caption's line below. The
130
+ * names are clipped rather than removed, so the list still reads every
131
+ * step; the caption is hidden from assistive technology, which would hear
132
+ * the name twice.
133
+ */
134
+ @container ds-stepper (max-width: 36rem) {
135
+ .ds-stepper__list,
136
+ .ds-stepper__step {
137
+ row-gap: 0;
138
+ }
139
+
140
+ .ds-stepper__label {
141
+ position: absolute;
142
+ inline-size: 1px;
143
+ block-size: 1px;
144
+ overflow: hidden;
145
+ clip-path: inset(50%);
146
+ white-space: nowrap;
147
+ }
148
+
149
+ .ds-stepper__caption {
150
+ display: block;
151
+ }
152
+ }
153
+
154
+ /*
155
+ * Forced colours drop the fills, so complete and current markers ring in
156
+ * the text colour, a complete one keeps its check, and the steps ahead
157
+ * stay bare: status still shows in shape.
158
+ */
159
+ @media (forced-colors: active) {
160
+ .ds-stepper__step--complete .ds-stepper__marker,
161
+ .ds-stepper__step--current .ds-stepper__marker {
162
+ border-color: currentColor;
163
+ }
164
+
165
+ .ds-stepper__step--upcoming .ds-stepper__marker {
166
+ border-style: none;
167
+ }
168
+ }
169
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,41 @@
1
+ import './stepper.css';
2
+ export interface StepperProps {
3
+ /** Names the list of steps, e.g. "Weekly plan steps". */
4
+ 'aria-label': string;
5
+ /** Each step's name, in order. */
6
+ steps: string[];
7
+ /**
8
+ * The index of the step the reader is on. Every step before it is
9
+ * complete; `steps.length` marks them all complete, for a finished flow.
10
+ */
11
+ current: number;
12
+ /** Words said after a complete step's name, e.g. "Done". */
13
+ completeLabel: string;
14
+ /** Extra class names on the outermost element. */
15
+ className?: string;
16
+ }
17
+ /**
18
+ * A row of numbered steps on a line, showing how far through a flow the
19
+ * reader is: steps already taken are filled and checked, the current one is
20
+ * outlined, and the steps still ahead show only their number.
21
+ *
22
+ * It reports progress and is not a control; the flow's own buttons move
23
+ * between steps. It renders an ordered list, so a screen reader counts the
24
+ * steps; the current one is `aria-current="step"` and a complete one adds
25
+ * `completeLabel` to its name. Status shows in shape as well as colour.
26
+ *
27
+ * The steps share the row evenly. Below 36rem of width the names leave the
28
+ * row, which keeps only its markers, and the current step's name shows on a
29
+ * line of its own below it; the list still reads every step out.
30
+ *
31
+ * ```tsx
32
+ * <Stepper
33
+ * aria-label="Weekly plan steps"
34
+ * steps={['Reconnect', 'Results', 'Prioritise', 'Schedule', 'Commit']}
35
+ * current={1}
36
+ * completeLabel="Done"
37
+ * />
38
+ * ```
39
+ */
40
+ export declare function Stepper({ 'aria-label': ariaLabel, steps, current, completeLabel, className, }: StepperProps): import("react/jsx-runtime").JSX.Element;
41
+ //# sourceMappingURL=stepper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.d.ts","sourceRoot":"","sources":["../../src/stepper/stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AASvB,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,YAAY,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,EACtB,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,OAAO,EACP,aAAa,EACb,SAAS,GACV,EAAE,YAAY,2CAoCd"}
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import './stepper.css';
3
+ import { cx } from '../cx';
4
+ import { Icon } from '../icon/icon';
5
+ import { useIconDefaults } from '../icon-defaults';
6
+ import { VisuallyHidden } from '../visually-hidden/visually-hidden';
7
+ const statusOf = (index, current) => index < current ? 'complete' : index === current ? 'current' : 'upcoming';
8
+ /**
9
+ * A row of numbered steps on a line, showing how far through a flow the
10
+ * reader is: steps already taken are filled and checked, the current one is
11
+ * outlined, and the steps still ahead show only their number.
12
+ *
13
+ * It reports progress and is not a control; the flow's own buttons move
14
+ * between steps. It renders an ordered list, so a screen reader counts the
15
+ * steps; the current one is `aria-current="step"` and a complete one adds
16
+ * `completeLabel` to its name. Status shows in shape as well as colour.
17
+ *
18
+ * The steps share the row evenly. Below 36rem of width the names leave the
19
+ * row, which keeps only its markers, and the current step's name shows on a
20
+ * line of its own below it; the list still reads every step out.
21
+ *
22
+ * ```tsx
23
+ * <Stepper
24
+ * aria-label="Weekly plan steps"
25
+ * steps={['Reconnect', 'Results', 'Prioritise', 'Schedule', 'Commit']}
26
+ * current={1}
27
+ * completeLabel="Done"
28
+ * />
29
+ * ```
30
+ */
31
+ export function Stepper({ 'aria-label': ariaLabel, steps, current, completeLabel, className, }) {
32
+ const { check } = useIconDefaults();
33
+ const renderStep = (label, index) => {
34
+ const status = statusOf(index, current);
35
+ return (_jsxs("li", { className: cx('ds-stepper__step', `ds-stepper__step--${status}`), "aria-current": status === 'current' ? 'step' : undefined, children: [_jsx("span", { className: "ds-stepper__track", children: _jsx("span", { className: "ds-stepper__marker", "aria-hidden": true, children: status === 'complete' ? _jsx(Icon, { source: check, size: "sm", decorative: true }) : index + 1 }) }), _jsxs("span", { className: "ds-stepper__label", children: [label, status === 'complete' && _jsxs(VisuallyHidden, { children: [", ", completeLabel] })] })] }, index));
36
+ };
37
+ return (_jsxs("div", { className: cx('ds-stepper', className), children: [_jsx("ol", { className: "ds-stepper__list", role: "list", "aria-label": ariaLabel, children: steps.map(renderStep) }), steps[current] && (_jsx("p", { className: "ds-stepper__caption", "aria-hidden": true, children: steps[current] }))] }));
38
+ }
39
+ //# sourceMappingURL=stepper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.js","sourceRoot":"","sources":["../../src/stepper/stepper.tsx"],"names":[],"mappings":";AAAA,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aAAa,IAAkB,IACvE,KAZF,KAAK,CAaP,CACN,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,aAEzC,aAAI,SAAS,EAAC,kBAAkB,EAAC,IAAI,EAAC,MAAM,gBAAa,SAAS,YAC/D,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,GACnB,EACJ,KAAK,CAAC,OAAO,CAAC,IAAI,CACjB,YAAG,SAAS,EAAC,qBAAqB,iCAC/B,KAAK,CAAC,OAAO,CAAC,GACb,CACL,IACG,CACP,CAAC;AACJ,CAAC","sourcesContent":["import './stepper.css';\nimport { cx } from '../cx';\nimport { Icon } from '../icon/icon';\nimport { useIconDefaults } from '../icon-defaults';\nimport { VisuallyHidden } from '../visually-hidden/visually-hidden';\n\n/** Where a step stands against the current one. */\ntype StepperStatus = 'complete' | 'current' | 'upcoming';\n\nexport interface StepperProps {\n /** Names the list of steps, e.g. \"Weekly plan steps\". */\n 'aria-label': string;\n /** Each step's name, in order. */\n steps: string[];\n /**\n * The index of the step the reader is on. Every step before it is\n * complete; `steps.length` marks them all complete, for a finished flow.\n */\n current: number;\n /** Words said after a complete step's name, e.g. \"Done\". */\n completeLabel: string;\n /** Extra class names on the outermost element. */\n className?: string;\n}\n\nconst statusOf = (index: number, current: number): StepperStatus =>\n index < current ? 'complete' : index === current ? 'current' : 'upcoming';\n\n/**\n * A row of numbered steps on a line, showing how far through a flow the\n * reader is: steps already taken are filled and checked, the current one is\n * outlined, and the steps still ahead show only their number.\n *\n * It reports progress and is not a control; the flow's own buttons move\n * between steps. It renders an ordered list, so a screen reader counts the\n * steps; the current one is `aria-current=\"step\"` and a complete one adds\n * `completeLabel` to its name. Status shows in shape as well as colour.\n *\n * The steps share the row evenly. Below 36rem of width the names leave the\n * row, which keeps only its markers, and the current step's name shows on a\n * line of its own below it; the list still reads every step out.\n *\n * ```tsx\n * <Stepper\n * aria-label=\"Weekly plan steps\"\n * steps={['Reconnect', 'Results', 'Prioritise', 'Schedule', 'Commit']}\n * current={1}\n * completeLabel=\"Done\"\n * />\n * ```\n */\nexport function Stepper({\n 'aria-label': ariaLabel,\n steps,\n current,\n completeLabel,\n className,\n}: StepperProps) {\n const { check } = useIconDefaults();\n const renderStep = (label: string, index: number) => {\n const status = statusOf(index, current);\n return (\n <li\n key={index}\n className={cx('ds-stepper__step', `ds-stepper__step--${status}`)}\n aria-current={status === 'current' ? 'step' : undefined}\n >\n <span className=\"ds-stepper__track\">\n <span className=\"ds-stepper__marker\" aria-hidden>\n {status === 'complete' ? <Icon source={check} size=\"sm\" decorative /> : index + 1}\n </span>\n </span>\n <span className=\"ds-stepper__label\">\n {label}\n {status === 'complete' && <VisuallyHidden>, {completeLabel}</VisuallyHidden>}\n </span>\n </li>\n );\n };\n\n return (\n <div className={cx('ds-stepper', className)}>\n {/* biome-ignore lint/a11y/noRedundantRoles: Safari drops the list role from an unstyled list */}\n <ol className=\"ds-stepper__list\" role=\"list\" aria-label={ariaLabel}>\n {steps.map(renderStep)}\n </ol>\n {steps[current] && (\n <p className=\"ds-stepper__caption\" aria-hidden>\n {steps[current]}\n </p>\n )}\n </div>\n );\n}\n"]}
@@ -4,9 +4,15 @@ export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
4
4
  export interface TooltipProps {
5
5
  /** The caption: a few words, never a control. */
6
6
  content: ReactNode;
7
- /** The element it captions. It keeps its own accessible name. */
7
+ /**
8
+ * The element it captions. It keeps its own accessible name. A disabled
9
+ * one (`disabled` set) is captioned too, and described for good; see the
10
+ * component's description.
11
+ */
8
12
  children: ReactElement<{
9
13
  id?: string;
14
+ disabled?: boolean;
15
+ 'aria-describedby'?: string;
10
16
  }>;
11
17
  /**
12
18
  * What the caption is to assistive tech. `description` (default) adds it
@@ -33,6 +39,16 @@ export interface TooltipProps {
33
39
  * for another control whose meaning its glyph alone does not say. Anything
34
40
  * a user must read to act belongs on the page, not in a tooltip: touch
35
41
  * screens never show one.
42
+ *
43
+ * A disabled control can carry the reason it is disabled ("Month planning
44
+ * is coming later"): the pointer still shows the caption, and since nothing
45
+ * can focus the control, its description holds the same words for good, for
46
+ * assistive technology, which still reads a disabled control. When the
47
+ * control is another part's trigger that finds itself by id (a tab), give it
48
+ * that id and the part the same one through its `ids`, as `CategoryTabs`
49
+ * does; the caption's trigger id otherwise replaces it. The keyboard skips a
50
+ * disabled control, so a sighted keyboard user never sees the caption: put
51
+ * anything they need on the page.
36
52
  */
37
53
  export declare function Tooltip({ content, children, kind, placement, }: TooltipProps): import("react/jsx-runtime").JSX.Element;
38
54
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAmC,MAAM,OAAO,CAAC;AAE3F,OAAO,eAAe,CAAC;AAEvB,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB,iEAAiE;IACjE,QAAQ,EAAE,YAAY,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAC/B,uEAAuE;IACvE,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,QAAQ,EACR,IAAoB,EACpB,SAAiB,GAClB,EAAE,YAAY,2CA0Dd"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAGf,OAAO,eAAe,CAAC;AAMvB,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnE,MAAM,WAAW,YAAY;IAC3B,iDAAiD;IACjD,OAAO,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,QAAQ,EAAE,YAAY,CAAC;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACzF;;;;;OAKG;IACH,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAC/B,uEAAuE;IACvE,SAAS,CAAC,EAAE,gBAAgB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,OAAO,CAAC,EACtB,OAAO,EACP,QAAQ,EACR,IAAoB,EACpB,SAAiB,GAClB,EAAE,YAAY,2CAiFd"}
@@ -1,9 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Portal } from '@ark-ui/react/portal';
3
3
  import { Tooltip as ArkTooltip } from '@ark-ui/react/tooltip';
4
- import { useContext, useEffect, useState } from 'react';
4
+ import { cloneElement, useContext, useEffect, useId, useState, useSyncExternalStore, } from 'react';
5
5
  import { PortalContainerContext } from '../portal-container';
6
+ import { VisuallyHidden } from '../visually-hidden/visually-hidden';
6
7
  import './tooltip.css';
8
+ const neverChanges = () => () => { };
9
+ const isClient = () => true;
10
+ const isServer = () => false;
7
11
  /**
8
12
  * A caption that shows while the pointer rests on its trigger or the
9
13
  * keyboard focuses it, built on Ark UI's Tooltip. Esc and moving away hide
@@ -19,6 +23,16 @@ import './tooltip.css';
19
23
  * for another control whose meaning its glyph alone does not say. Anything
20
24
  * a user must read to act belongs on the page, not in a tooltip: touch
21
25
  * screens never show one.
26
+ *
27
+ * A disabled control can carry the reason it is disabled ("Month planning
28
+ * is coming later"): the pointer still shows the caption, and since nothing
29
+ * can focus the control, its description holds the same words for good, for
30
+ * assistive technology, which still reads a disabled control. When the
31
+ * control is another part's trigger that finds itself by id (a tab), give it
32
+ * that id and the part the same one through its `ids`, as `CategoryTabs`
33
+ * does; the caption's trigger id otherwise replaces it. The keyboard skips a
34
+ * disabled control, so a sighted keyboard user never sees the caption: put
35
+ * anything they need on the page.
22
36
  */
23
37
  export function Tooltip({ content, children, kind = 'description', placement = 'top', }) {
24
38
  const portalContainer = useContext(PortalContainerContext);
@@ -28,6 +42,7 @@ export function Tooltip({ content, children, kind = 'description', placement = '
28
42
  * one. A description the trigger sets itself still wins.
29
43
  */
30
44
  const triggerDescription = kind === 'label' ? '' : undefined;
45
+ const describesDisabled = children.props.disabled === true && kind === 'description';
31
46
  /*
32
47
  * A trigger that is itself another part's asChild trigger (a Menu's, a
33
48
  * Dialog's close button, a Calendar arrow) takes that part's id, and the
@@ -36,7 +51,23 @@ export function Tooltip({ content, children, kind = 'description', placement = '
36
51
  * with keeps the lookup on the real element.
37
52
  */
38
53
  const triggerId = children.props.id;
54
+ const descriptionId = useId();
39
55
  const [open, setOpen] = useState(false);
56
+ const description = [children.props['aria-describedby'], descriptionId].filter(Boolean).join(' ');
57
+ /*
58
+ * A disabled control's description holds the caption for good, since
59
+ * nothing can focus the control to show it. The words live at the end of
60
+ * the page, not beside the control: a list that may hold only its items (a
61
+ * tablist, a menu) would otherwise hold a stray text.
62
+ */
63
+ const trigger = describesDisabled
64
+ ? cloneElement(children, { 'aria-describedby': description })
65
+ : children;
66
+ /*
67
+ * A portal renders in place on the server and while hydrating, which would
68
+ * put the words inside the list after all, so they wait for the client.
69
+ */
70
+ const onClient = useSyncExternalStore(neverChanges, isClient, isServer);
40
71
  /*
41
72
  * Escape hides the caption and goes on to whatever else it means: Zag's
42
73
  * own Escape handling stops the key at the document, so a keyboard drag
@@ -53,6 +84,6 @@ export function Tooltip({ content, children, kind = 'description', placement = '
53
84
  document.addEventListener('keydown', hide);
54
85
  return () => document.removeEventListener('keydown', hide);
55
86
  }, [open]);
56
- return (_jsxs(ArkTooltip.Root, { lazyMount: true, unmountOnExit: true, positioning: { placement, gutter: 6 }, ids: triggerId ? { trigger: triggerId } : undefined, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, children: [_jsx(ArkTooltip.Trigger, { asChild: true, "aria-describedby": triggerDescription, children: children }), _jsx(Portal, { container: portalContainer, children: _jsx(ArkTooltip.Positioner, { children: _jsx(ArkTooltip.Content, { className: "ds-tooltip__content", "aria-hidden": kind === 'label' ? true : undefined, children: content }) }) })] }));
87
+ return (_jsxs(ArkTooltip.Root, { lazyMount: true, unmountOnExit: true, positioning: { placement, gutter: 6 }, ids: triggerId ? { trigger: triggerId } : undefined, open: open, onOpenChange: (details) => setOpen(details.open), closeOnEscape: false, children: [_jsx(ArkTooltip.Trigger, { asChild: true, "aria-describedby": triggerDescription, children: trigger }), describesDisabled && onClient && (_jsx(Portal, { container: portalContainer, children: _jsx(VisuallyHidden, { id: descriptionId, children: content }) })), _jsx(Portal, { container: portalContainer, children: _jsx(ArkTooltip.Positioner, { children: _jsx(ArkTooltip.Content, { className: "ds-tooltip__content", "aria-hidden": kind === 'label' ? true : undefined, children: content }) }) })] }));
57
88
  }
58
89
  //# sourceMappingURL=tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAqC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,eAAe,CAAC;AAoBvB;;;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K,aAEpB,KAAC,UAAU,CAAC,OAAO,IAAC,OAAO,4BAAmB,kBAAkB,YAC7D,QAAQ,GACU,EACrB,KAAC,MAAM,IAAC,SAAS,EAAE,eAAe,YAChC,KAAC,UAAU,CAAC,UAAU,cACpB,KAAC,UAAU,CAAC,OAAO,IACjB,SAAS,EAAC,qBAAqB,iBAClB,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,YAE/C,OAAO,GACW,GACC,GACjB,IACO,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { Portal } from '@ark-ui/react/portal';\nimport { Tooltip as ArkTooltip } from '@ark-ui/react/tooltip';\nimport { type ReactElement, type ReactNode, useContext, useEffect, useState } from 'react';\nimport { PortalContainerContext } from '../portal-container';\nimport './tooltip.css';\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface TooltipProps {\n /** The caption: a few words, never a control. */\n content: ReactNode;\n /** The element it captions. It keeps its own accessible name. */\n children: ReactElement<{ id?: string }>;\n /**\n * What the caption is to assistive tech. `description` (default) adds it\n * to the trigger's description while it shows. `label` says it repeats the\n * trigger's accessible name, as an icon-only button's caption does, so it\n * is left out and the name is announced once.\n */\n kind?: 'description' | 'label';\n /** Side of the trigger it opens on, flipping when there is no room. */\n placement?: TooltipPlacement;\n}\n\n/**\n * A caption that shows while the pointer rests on its trigger or the\n * keyboard focuses it, built on Ark UI's Tooltip. Esc and moving away hide\n * it; it never takes focus and holds nothing to click.\n *\n * ```tsx\n * <Tooltip content=\"Archive\">\n * <button type=\"button\" aria-label=\"Archive Run 10k\">…</button>\n * </Tooltip>\n * ```\n *\n * `IconButton` shows one with its label by default. Reach for it directly\n * for another control whose meaning its glyph alone does not say. Anything\n * a user must read to act belongs on the page, not in a tooltip: touch\n * screens never show one.\n */\nexport function Tooltip({\n content,\n children,\n kind = 'description',\n placement = 'top',\n}: TooltipProps) {\n const portalContainer = useContext(PortalContainerContext);\n /*\n * Zag points the trigger's description at the caption while it shows, and\n * only a defined value overrides it, so a label caption passes an empty\n * one. A description the trigger sets itself still wins.\n */\n const triggerDescription = kind === 'label' ? '' : undefined;\n /*\n * A trigger that is itself another part's asChild trigger (a Menu's, a\n * Dialog's close button, a Calendar arrow) takes that part's id, and the\n * child's props win the merge, so Zag would look for its own id and find\n * nothing to place the caption against. Naming the id the trigger ends up\n * with keeps the lookup on the real element.\n */\n const triggerId = children.props.id;\n const [open, setOpen] = useState(false);\n\n /*\n * Escape hides the caption and goes on to whatever else it means: Zag's\n * own Escape handling stops the key at the document, so a keyboard drag\n * could not be cancelled and a dialog would not close while a caption\n * showed.\n */\n useEffect(() => {\n if (!open) return;\n const hide = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setOpen(false);\n };\n document.addEventListener('keydown', hide);\n return () => document.removeEventListener('keydown', hide);\n }, [open]);\n\n return (\n <ArkTooltip.Root\n lazyMount\n unmountOnExit\n positioning={{ placement, gutter: 6 }}\n ids={triggerId ? { trigger: triggerId } : undefined}\n open={open}\n onOpenChange={(details) => setOpen(details.open)}\n closeOnEscape={false}\n >\n <ArkTooltip.Trigger asChild aria-describedby={triggerDescription}>\n {children}\n </ArkTooltip.Trigger>\n <Portal container={portalContainer}>\n <ArkTooltip.Positioner>\n <ArkTooltip.Content\n className=\"ds-tooltip__content\"\n aria-hidden={kind === 'label' ? true : undefined}\n >\n {content}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n </Portal>\n </ArkTooltip.Root>\n );\n}\n"]}
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../src/tooltip/tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,YAAY,EAGZ,UAAU,EACV,SAAS,EACT,KAAK,EACL,QAAQ,EACR,oBAAoB,GACrB,MAAM,OAAO,C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jB,SAAS,EAAC,qBAAqB,iBAClB,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,YAE/C,OAAO,GACW,GACC,GACjB,IACO,CACnB,CAAC;AACJ,CAAC","sourcesContent":["import { Portal } from '@ark-ui/react/portal';\nimport { Tooltip as ArkTooltip } from '@ark-ui/react/tooltip';\nimport {\n cloneElement,\n type ReactElement,\n type ReactNode,\n useContext,\n useEffect,\n useId,\n useState,\n useSyncExternalStore,\n} from 'react';\nimport { PortalContainerContext } from '../portal-container';\nimport { VisuallyHidden } from '../visually-hidden/visually-hidden';\nimport './tooltip.css';\n\nconst neverChanges = () => () => {};\nconst isClient = () => true;\nconst isServer = () => false;\n\nexport type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';\n\nexport interface TooltipProps {\n /** The caption: a few words, never a control. */\n content: ReactNode;\n /**\n * The element it captions. It keeps its own accessible name. A disabled\n * one (`disabled` set) is captioned too, and described for good; see the\n * component's description.\n */\n children: ReactElement<{ id?: string; disabled?: boolean; 'aria-describedby'?: string }>;\n /**\n * What the caption is to assistive tech. `description` (default) adds it\n * to the trigger's description while it shows. `label` says it repeats the\n * trigger's accessible name, as an icon-only button's caption does, so it\n * is left out and the name is announced once.\n */\n kind?: 'description' | 'label';\n /** Side of the trigger it opens on, flipping when there is no room. */\n placement?: TooltipPlacement;\n}\n\n/**\n * A caption that shows while the pointer rests on its trigger or the\n * keyboard focuses it, built on Ark UI's Tooltip. Esc and moving away hide\n * it; it never takes focus and holds nothing to click.\n *\n * ```tsx\n * <Tooltip content=\"Archive\">\n * <button type=\"button\" aria-label=\"Archive Run 10k\">…</button>\n * </Tooltip>\n * ```\n *\n * `IconButton` shows one with its label by default. Reach for it directly\n * for another control whose meaning its glyph alone does not say. Anything\n * a user must read to act belongs on the page, not in a tooltip: touch\n * screens never show one.\n *\n * A disabled control can carry the reason it is disabled (\"Month planning\n * is coming later\"): the pointer still shows the caption, and since nothing\n * can focus the control, its description holds the same words for good, for\n * assistive technology, which still reads a disabled control. When the\n * control is another part's trigger that finds itself by id (a tab), give it\n * that id and the part the same one through its `ids`, as `CategoryTabs`\n * does; the caption's trigger id otherwise replaces it. The keyboard skips a\n * disabled control, so a sighted keyboard user never sees the caption: put\n * anything they need on the page.\n */\nexport function Tooltip({\n content,\n children,\n kind = 'description',\n placement = 'top',\n}: TooltipProps) {\n const portalContainer = useContext(PortalContainerContext);\n /*\n * Zag points the trigger's description at the caption while it shows, and\n * only a defined value overrides it, so a label caption passes an empty\n * one. A description the trigger sets itself still wins.\n */\n const triggerDescription = kind === 'label' ? '' : undefined;\n const describesDisabled = children.props.disabled === true && kind === 'description';\n /*\n * A trigger that is itself another part's asChild trigger (a Menu's, a\n * Dialog's close button, a Calendar arrow) takes that part's id, and the\n * child's props win the merge, so Zag would look for its own id and find\n * nothing to place the caption against. Naming the id the trigger ends up\n * with keeps the lookup on the real element.\n */\n const triggerId = children.props.id;\n const descriptionId = useId();\n const [open, setOpen] = useState(false);\n\n const description = [children.props['aria-describedby'], descriptionId].filter(Boolean).join(' ');\n /*\n * A disabled control's description holds the caption for good, since\n * nothing can focus the control to show it. The words live at the end of\n * the page, not beside the control: a list that may hold only its items (a\n * tablist, a menu) would otherwise hold a stray text.\n */\n const trigger = describesDisabled\n ? cloneElement(children, { 'aria-describedby': description })\n : children;\n /*\n * A portal renders in place on the server and while hydrating, which would\n * put the words inside the list after all, so they wait for the client.\n */\n const onClient = useSyncExternalStore(neverChanges, isClient, isServer);\n\n /*\n * Escape hides the caption and goes on to whatever else it means: Zag's\n * own Escape handling stops the key at the document, so a keyboard drag\n * could not be cancelled and a dialog would not close while a caption\n * showed.\n */\n useEffect(() => {\n if (!open) return;\n const hide = (event: KeyboardEvent) => {\n if (event.key === 'Escape') setOpen(false);\n };\n document.addEventListener('keydown', hide);\n return () => document.removeEventListener('keydown', hide);\n }, [open]);\n\n return (\n <ArkTooltip.Root\n lazyMount\n unmountOnExit\n positioning={{ placement, gutter: 6 }}\n ids={triggerId ? { trigger: triggerId } : undefined}\n open={open}\n onOpenChange={(details) => setOpen(details.open)}\n closeOnEscape={false}\n >\n <ArkTooltip.Trigger asChild aria-describedby={triggerDescription}>\n {trigger}\n </ArkTooltip.Trigger>\n {describesDisabled && onClient && (\n <Portal container={portalContainer}>\n <VisuallyHidden id={descriptionId}>{content}</VisuallyHidden>\n </Portal>\n )}\n <Portal container={portalContainer}>\n <ArkTooltip.Positioner>\n <ArkTooltip.Content\n className=\"ds-tooltip__content\"\n aria-hidden={kind === 'label' ? true : undefined}\n >\n {content}\n </ArkTooltip.Content>\n </ArkTooltip.Positioner>\n </Portal>\n </ArkTooltip.Root>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/ui-core",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -176,6 +176,10 @@
176
176
  "types": "./dist/status-dot/index.d.ts",
177
177
  "import": "./dist/status-dot/index.js"
178
178
  },
179
+ "./stepper": {
180
+ "types": "./dist/stepper/index.d.ts",
181
+ "import": "./dist/stepper/index.js"
182
+ },
179
183
  "./sticky": {
180
184
  "types": "./dist/sticky/index.d.ts",
181
185
  "import": "./dist/sticky/index.js"
@@ -356,6 +360,10 @@
356
360
  "types": "./dist/status-dot/status-dot.css.d.ts",
357
361
  "default": "./dist/status-dot/status-dot.css"
358
362
  },
363
+ "./css/stepper": {
364
+ "types": "./dist/stepper/stepper.css.d.ts",
365
+ "default": "./dist/stepper/stepper.css"
366
+ },
359
367
  "./css/sticky": {
360
368
  "types": "./dist/sticky/sticky.css.d.ts",
361
369
  "default": "./dist/sticky/sticky.css"
@@ -412,7 +420,7 @@
412
420
  },
413
421
  "devDependencies": {
414
422
  "@manakind/ds-config": "*",
415
- "@manakind/manuia-tokens": "0.34.0",
423
+ "@manakind/manuia-tokens": "0.37.0",
416
424
  "@testing-library/jest-dom": "^6.9.1",
417
425
  "@testing-library/react": "^16.3.2",
418
426
  "@testing-library/user-event": "^14.6.1",