@manakind/ui-core 0.3.0 → 0.4.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
@@ -64,6 +64,7 @@ separately, so an app can load only what it renders.
64
64
  | `@manakind/ui-core/illustration` | `Illustration` + `illustrationPaint` |
65
65
  | `@manakind/ui-core/progress` | `Progress` |
66
66
  | `@manakind/ui-core/select` | `Select` |
67
+ | `@manakind/ui-core/switch` | `Switch` |
67
68
  | `@manakind/ui-core/tabs` | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` |
68
69
  | `@manakind/ui-core/css/badge` | Badge structural CSS |
69
70
  | `@manakind/ui-core/css/button` | Button + IconButton structural CSS |
@@ -72,6 +73,7 @@ separately, so an app can load only what it renders.
72
73
  | `@manakind/ui-core/css/illustration` | Illustration structural CSS, including the paint roles |
73
74
  | `@manakind/ui-core/css/progress` | Progress structural CSS |
74
75
  | `@manakind/ui-core/css/select` | Select structural CSS |
76
+ | `@manakind/ui-core/css/switch` | Switch structural CSS |
75
77
  | `@manakind/ui-core/css/tabs` | Tabs structural CSS |
76
78
 
77
79
  Structural CSS is only half of what a component needs — it consumes `--ds-*` custom
package/dist/index.d.ts CHANGED
@@ -6,5 +6,6 @@ export * from './icon';
6
6
  export * from './illustration';
7
7
  export * from './progress';
8
8
  export * from './select';
9
+ export * from './switch';
9
10
  export * from './tabs';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -6,5 +6,6 @@ export * from './icon';
6
6
  export * from './illustration';
7
7
  export * from './progress';
8
8
  export * from './select';
9
+ export * from './switch';
9
10
  export * from './tabs';
10
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC"}
@@ -27,6 +27,16 @@
27
27
  background-color: var(--ds-select-content-bg);
28
28
  max-height: 20rem;
29
29
  overflow-y: auto;
30
+ /*
31
+ * Zag copies this onto the positioner, which is a sibling of the page in
32
+ * `<body>`. Without it the listbox ranks as `auto` and any positioned page
33
+ * content can paint over the open options. The product apps put their
34
+ * popovers, dialogs and sticky headers at 50 (Tailwind's `z-50`). The
35
+ * listbox opens from one of those, so it sits a step above them: at an
36
+ * equal 50 the tie goes to DOM order, and React inserts a Select's portal
37
+ * before the dialog that contains it, so the dialog covered its options.
38
+ */
39
+ z-index: 60;
30
40
 
31
41
  &:focus-visible {
32
42
  outline: 2px solid var(--ds-select-focus-ring);
@@ -129,7 +129,9 @@ export interface SelectProps {
129
129
  * anatomy directly in a product package rather than widening this API.
130
130
  *
131
131
  * The listbox renders in a portal, so it escapes ancestor `overflow: hidden`
132
- * rather than being clipped inside a card.
132
+ * rather than being clipped inside a card. It sits at `z-index: 60`, a step
133
+ * above the products' overlay layer (50), so it paints above the page or
134
+ * dialog it opens from.
133
135
  */
134
136
  export declare function Select({ items, label, placeholder, value, defaultValue, onValueChange, size, disabled, loading, loadingText, invalid, name, className, renderItem, indicator, itemIndicator, 'aria-label': ariaLabel, }: SelectProps): import("react/jsx-runtime").JSX.Element;
135
137
  //# sourceMappingURL=select.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,cAAc,CAAC;AAGtB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,UAAU;IACzB,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;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AA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,gGAAgG;IAChG,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,2DAA2D;IAC3D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,YAAY,EACZ,aAAa,EACb,IAAW,EACX,QAAQ,EACR,OAAe,EACf,WAAwB,EACxB,OAAO,EACP,IAAI,EACJ,SAAS,EACT,UAAU,EACV,SAAwB,EACxB,aAAqB,EACrB,YAAY,EAAE,SAAS,GACxB,EAAE,WAAW,2CA4Fb"}
@@ -28,7 +28,9 @@ import { cx } from '../cx';
28
28
  * anatomy directly in a product package rather than widening this API.
29
29
  *
30
30
  * The listbox renders in a portal, so it escapes ancestor `overflow: hidden`
31
- * rather than being clipped inside a card.
31
+ * rather than being clipped inside a card. It sits at `z-index: 60`, a step
32
+ * above the products' overlay layer (50), so it paints above the page or
33
+ * dialog it opens from.
32
34
  */
33
35
  export function Select({ items, label, placeholder, value, defaultValue, onValueChange, size = 'md', disabled, loading = false, loadingText = 'Loading…', invalid, name, className, renderItem, indicator = ChevronRight, itemIndicator = Check, 'aria-label': ariaLabel, }) {
34
36
  const collection = useMemo(() => createListCollection({
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sourceRoot":"","sources":["../../src/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,oBAAoB,EAA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aAAa,EAAE,IAAI,EAAC,IAAI,EAAC,UAAU,SAAG,GAC5B,KANP,IAAI,CAAC,KAAK,CAOd,CAClB,CAAC,GACgB,GACC,GAChB,EAET,KAAC,SAAS,CAAC,YAAY,KAAG,IACX,CAClB,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,YAAY,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CAC1C,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,cAAc,EAChB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,YAAY,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAEhD,MAAM,KAAK,GAAe,CAAC,KAAK,EAAE,EAAE,CAAC,CACnC,6BAAiB,MAAM,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,KAAK,KAAK,YAC/D,eACE,CAAC,EAAC,kBAAkB,EACpB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,GACtB,GACE,CACP,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { SwitchLabelPlacement, SwitchProps, SwitchSize } from './switch';
2
+ export { Switch } from './switch';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/switch/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Switch } from './switch';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/switch/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,141 @@
1
+ @layer components {
2
+ .ds-switch {
3
+ /*
4
+ * Underscore-prefixed, NOT `--ds-`: that namespace is the contract a
5
+ * product implements. These are the component's own derivations from it.
6
+ *
7
+ * The thumb is the track's height less its border and inset on each
8
+ * side, and it travels the difference between the track's width and
9
+ * height, so the gap around it is the same at every size and in every
10
+ * state: the invalid state widens the border and the thumb shrinks with
11
+ * it.
12
+ */
13
+ --_switch-track-border-width: 1px;
14
+ --_switch-track-inset: 2px;
15
+ --_switch-thumb-size: calc(
16
+ var(--_switch-track-height) -
17
+ 2 *
18
+ var(--_switch-track-border-width) -
19
+ 2 *
20
+ var(--_switch-track-inset)
21
+ );
22
+ --_switch-thumb-travel: calc(var(--_switch-track-width) - var(--_switch-track-height));
23
+
24
+ display: inline-flex;
25
+ align-items: center;
26
+ gap: var(--ds-switch-label-gap);
27
+ color: var(--ds-switch-label-text);
28
+ font-size: var(--_switch-font-size);
29
+ cursor: pointer;
30
+
31
+ &[data-disabled] {
32
+ cursor: not-allowed;
33
+ }
34
+
35
+ &[data-readonly] {
36
+ cursor: default;
37
+ }
38
+
39
+ & .ds-switch__control {
40
+ box-sizing: border-box;
41
+ display: inline-flex;
42
+ align-items: center;
43
+ flex-shrink: 0;
44
+ width: var(--_switch-track-width);
45
+ height: var(--_switch-track-height);
46
+ padding: var(--_switch-track-inset);
47
+ border: var(--_switch-track-border-width) solid var(--ds-switch-track-border);
48
+ border-radius: var(--ds-switch-track-radius);
49
+ background-color: var(--ds-switch-track-bg);
50
+ transition:
51
+ background-color 150ms cubic-bezier(0, 0, 0.2, 1),
52
+ border-color 150ms cubic-bezier(0, 0, 0.2, 1);
53
+
54
+ /*
55
+ * The border stays in the checked state. The checked fill is a brand
56
+ * colour that may not clear 3:1 against the page on its own (Manuia's
57
+ * olive does not in light), so the border is what bounds the track.
58
+ */
59
+ &[data-state="checked"] {
60
+ background-color: var(--ds-switch-track-bg-checked);
61
+ }
62
+
63
+ /*
64
+ * Thicker as well as red, as on Select: colour alone is a weak signal on
65
+ * a control, and this one has to survive a red-green colour deficiency.
66
+ * Scoped above `checked` on purpose, so an invalid switch keeps saying
67
+ * so in either state.
68
+ */
69
+ &[data-invalid] {
70
+ --_switch-track-border-width: 2px;
71
+
72
+ border-color: var(--ds-switch-track-border-invalid);
73
+ }
74
+
75
+ /*
76
+ * Ark moves focus to the hidden input and mirrors its `:focus-visible`
77
+ * onto the control as a data attribute, so the ring is drawn here, where
78
+ * the user is looking. Same ring as every control: 2px, 3px out.
79
+ */
80
+ &[data-focus-visible] {
81
+ outline: 2px solid var(--ds-switch-focus-ring);
82
+ outline-offset: 3px;
83
+ }
84
+
85
+ &[data-disabled] {
86
+ opacity: var(--ds-opacity-disabled);
87
+ }
88
+ }
89
+
90
+ /*
91
+ * The thumb carries its own border. On the resting track it sits on a
92
+ * neighbouring neutral, where its fill alone is near-invisible, and the
93
+ * thumb's position is what says "off".
94
+ */
95
+ & .ds-switch__thumb {
96
+ box-sizing: border-box;
97
+ width: var(--_switch-thumb-size);
98
+ height: var(--_switch-thumb-size);
99
+ border: 1px solid var(--ds-switch-thumb-border);
100
+ border-radius: var(--ds-switch-track-radius);
101
+ background-color: var(--ds-switch-thumb-bg);
102
+ box-shadow: var(--ds-switch-thumb-shadow);
103
+ transition: translate 150ms cubic-bezier(0, 0, 0.2, 1);
104
+
105
+ /*
106
+ * On the checked track the thumb's fill may not contrast with the fill
107
+ * behind it, so the border changes with the state. A product whose
108
+ * thumb already contrasts sets it to the thumb's own colour.
109
+ */
110
+ &[data-state="checked"] {
111
+ border-color: var(--ds-switch-thumb-border-checked);
112
+ translate: var(--_switch-thumb-travel) 0;
113
+ }
114
+ }
115
+
116
+ @media (prefers-reduced-motion: reduce) {
117
+ & .ds-switch__control,
118
+ & .ds-switch__thumb {
119
+ transition: none;
120
+ }
121
+ }
122
+
123
+ &.ds-switch--sm {
124
+ --_switch-track-width: var(--ds-switch-size-sm-track-width);
125
+ --_switch-track-height: var(--ds-switch-size-sm-track-height);
126
+ --_switch-font-size: var(--ds-switch-size-sm-font-size);
127
+ }
128
+
129
+ &.ds-switch--md {
130
+ --_switch-track-width: var(--ds-switch-size-md-track-width);
131
+ --_switch-track-height: var(--ds-switch-size-md-track-height);
132
+ --_switch-font-size: var(--ds-switch-size-md-font-size);
133
+ }
134
+
135
+ &.ds-switch--lg {
136
+ --_switch-track-width: var(--ds-switch-size-lg-track-width);
137
+ --_switch-track-height: var(--ds-switch-size-lg-track-height);
138
+ --_switch-font-size: var(--ds-switch-size-lg-font-size);
139
+ }
140
+ }
141
+ }
@@ -0,0 +1,2 @@
1
+ /* AUTOGENERATED: types for the stylesheet beside it. */
2
+ export {};
@@ -0,0 +1,76 @@
1
+ import { type ReactNode } from 'react';
2
+ import './switch.css';
3
+ export type SwitchSize = 'sm' | 'md' | 'lg';
4
+ export type SwitchLabelPlacement = 'start' | 'end';
5
+ /**
6
+ * A switch has to have a name. A visible `label` is the one to reach for: the
7
+ * whole label is the click target, so it also enlarges the hit area. Expressed
8
+ * as a union so an unnamed switch is a compile error rather than an axe
9
+ * finding, the way `IconProps` pairs label and decorative.
10
+ */
11
+ type SwitchName = {
12
+ /** Visible label. The whole label is the click target. */
13
+ label: ReactNode;
14
+ 'aria-label'?: string;
15
+ } | {
16
+ label?: undefined;
17
+ /** Accessible name when no visible label fits, such as a table cell whose row already says what the switch is. */
18
+ 'aria-label': string;
19
+ };
20
+ export type SwitchProps = SwitchName & {
21
+ /**
22
+ * Which side of the control the label sits on. `end` (default) reads
23
+ * "control, then what it does"; `start` puts the label first, for a
24
+ * settings row. Only the order changes; the row's layout is the caller's.
25
+ */
26
+ labelPlacement?: SwitchLabelPlacement;
27
+ /** Controlled checked state. Leave undefined to let the component own it. */
28
+ checked?: boolean;
29
+ /** Initial state when uncontrolled. */
30
+ defaultChecked?: boolean;
31
+ /** Fired with the new state whenever the user toggles the switch. */
32
+ onCheckedChange?: (checked: boolean) => void;
33
+ /** Control size and label type scale. */
34
+ size?: SwitchSize;
35
+ /** Disable the control. It keeps its state and stops responding. */
36
+ disabled?: boolean;
37
+ /**
38
+ * Marks the control invalid for assistive tech and styling (`data-invalid`).
39
+ * Pair it with a message the control points at through `aria-describedby`;
40
+ * a red border alone is not an accessible error.
41
+ */
42
+ invalid?: boolean;
43
+ /** Id of the element that describes the control, such as an error message. */
44
+ 'aria-describedby'?: string;
45
+ /** Show the state without letting the user change it. */
46
+ readOnly?: boolean;
47
+ /** Marks the hidden input required for native form validation. */
48
+ required?: boolean;
49
+ /** Name for native form participation. */
50
+ name?: string;
51
+ /** Value submitted under `name` while checked. Defaults to `on`. */
52
+ value?: string;
53
+ /** Extra class names appended after the `ds-switch` modifiers. */
54
+ className?: string;
55
+ };
56
+ /**
57
+ * On/off control for a setting that takes effect at once, built on Ark UI.
58
+ *
59
+ * Ark owns the behaviour: a hidden checkbox carries the checked state, the
60
+ * root is the `<label>` that names it, and keyboard (Space) and pointer
61
+ * toggling come for free. The input is given `role="switch"` and
62
+ * `aria-readonly` here, which Ark leaves off, so it is announced as a switch
63
+ * rather than a checkbox, and a read-only one says so. This wrapper contributes `ds-`
64
+ * classes, the `--ds-switch-*` bindings, and a flat prop API.
65
+ *
66
+ * ```tsx
67
+ * <Switch label="Gap view" checked={gapView} onCheckedChange={setGapView} />
68
+ * ```
69
+ *
70
+ * A switch is for a setting that applies immediately. A choice that is only
71
+ * saved on submit is a checkbox; a choice between several values is a select
72
+ * or a segmented control.
73
+ */
74
+ export declare function Switch({ label, labelPlacement, checked, defaultChecked, onCheckedChange, size, disabled, invalid, readOnly, required, name, value, className, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, }: SwitchProps): import("react/jsx-runtime").JSX.Element;
75
+ export {};
76
+ //# sourceMappingURL=switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/switch/switch.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAU,MAAM,OAAO,CAAC;AAC/C,OAAO,cAAc,CAAC;AAGtB,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,KAAK,CAAC;AAEnD;;;;;GAKG;AACH,KAAK,UAAU,GACX;IACE,0DAA0D;IAC1D,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GACD;IACE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kHAAkH;IAClH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG;IACrC;;;;OAIG;IACH,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,6EAA6E;IAC7E,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uCAAuC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qEAAqE;IACrE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,yCAAyC;IACzC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,cAAsB,EACtB,OAAO,EACP,cAAc,EACd,eAAe,EACf,IAAW,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,SAAS,EACT,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,eAAe,GACpC,EAAE,WAAW,2CA+Cb"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Switch as ArkSwitch } from '@ark-ui/react/switch';
3
+ import { useRef } from 'react';
4
+ import './switch.css';
5
+ import { cx } from '../cx';
6
+ /**
7
+ * On/off control for a setting that takes effect at once, built on Ark UI.
8
+ *
9
+ * Ark owns the behaviour: a hidden checkbox carries the checked state, the
10
+ * root is the `<label>` that names it, and keyboard (Space) and pointer
11
+ * toggling come for free. The input is given `role="switch"` and
12
+ * `aria-readonly` here, which Ark leaves off, so it is announced as a switch
13
+ * rather than a checkbox, and a read-only one says so. This wrapper contributes `ds-`
14
+ * classes, the `--ds-switch-*` bindings, and a flat prop API.
15
+ *
16
+ * ```tsx
17
+ * <Switch label="Gap view" checked={gapView} onCheckedChange={setGapView} />
18
+ * ```
19
+ *
20
+ * A switch is for a setting that applies immediately. A choice that is only
21
+ * saved on submit is a checkbox; a choice between several values is a select
22
+ * or a segmented control.
23
+ */
24
+ export function Switch({ label, labelPlacement = 'end', checked, defaultChecked, onCheckedChange, size = 'md', disabled, invalid, readOnly, required, name, value, className, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, }) {
25
+ const labelNode = label ? (_jsx(ArkSwitch.Label, { className: "ds-switch__label", children: label })) : null;
26
+ const inputRef = useRef(null);
27
+ /*
28
+ * Ark renders the hidden input uncontrolled (`defaultChecked`) and syncs it
29
+ * only when its own state changes. A controlled parent that declines a
30
+ * toggle therefore leaves the native input flipped while the control shows
31
+ * the old state, and assistive tech reads the input. Ark reports the toggle
32
+ * after reading the input, so restoring the parent's value here is safe:
33
+ * a parent that accepts re-renders, and Ark syncs the input again.
34
+ */
35
+ const handleCheckedChange = (details) => {
36
+ onCheckedChange?.(details.checked);
37
+ if (checked !== undefined && inputRef.current)
38
+ inputRef.current.checked = checked;
39
+ };
40
+ return (_jsxs(ArkSwitch.Root, { className: cx('ds-switch', `ds-switch--${size}`, className), checked: checked, defaultChecked: defaultChecked, onCheckedChange: handleCheckedChange, disabled: disabled, invalid: invalid, readOnly: readOnly, required: required, name: name, value: value, children: [labelPlacement === 'start' && labelNode, _jsx(ArkSwitch.Control, { className: "ds-switch__control", children: _jsx(ArkSwitch.Thumb, { className: "ds-switch__thumb" }) }), labelPlacement === 'end' && labelNode, _jsx(ArkSwitch.HiddenInput, { ref: inputRef, role: "switch", "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, "aria-readonly": readOnly || undefined })] }));
41
+ }
42
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sourceRoot":"","sources":["../../src/switch/switch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAkB,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA6D3B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,KAAK,EACL,cAAc,GAAG,KAAK,EACtB,OAAO,EACP,cAAc,EACd,eAAe,EACf,IAAI,GAAG,IAAI,EACX,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,SAAS,EACT,YAAY,EAAE,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ED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/ui-core",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -64,6 +64,10 @@
64
64
  "types": "./dist/select/select.css.d.ts",
65
65
  "default": "./dist/select/select.css"
66
66
  },
67
+ "./css/switch": {
68
+ "types": "./dist/switch/switch.css.d.ts",
69
+ "default": "./dist/switch/switch.css"
70
+ },
67
71
  "./css/tabs": {
68
72
  "types": "./dist/tabs/tabs.css.d.ts",
69
73
  "default": "./dist/tabs/tabs.css"
@@ -84,6 +88,10 @@
84
88
  "types": "./dist/select/index.d.ts",
85
89
  "import": "./dist/select/index.js"
86
90
  },
91
+ "./switch": {
92
+ "types": "./dist/switch/index.d.ts",
93
+ "import": "./dist/switch/index.js"
94
+ },
87
95
  "./tabs": {
88
96
  "types": "./dist/tabs/index.d.ts",
89
97
  "import": "./dist/tabs/index.js"
@@ -106,7 +114,7 @@
106
114
  },
107
115
  "devDependencies": {
108
116
  "@manakind/ds-config": "*",
109
- "@manakind/manuia-tokens": "0.3.0",
117
+ "@manakind/manuia-tokens": "0.4.0",
110
118
  "@testing-library/jest-dom": "^6.9.1",
111
119
  "@testing-library/react": "^16.3.2",
112
120
  "@testing-library/user-event": "^14.6.1",