ionbase-ui 0.1.1 → 0.3.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.
Files changed (72) hide show
  1. package/README.md +129 -3
  2. package/dist/components/Avatar.d.ts +8 -5
  3. package/dist/components/Avatar.d.ts.map +1 -1
  4. package/dist/components/Avatar.js +31 -11
  5. package/dist/components/Avatar.js.map +1 -1
  6. package/dist/components/Button.d.ts +4 -0
  7. package/dist/components/Button.d.ts.map +1 -1
  8. package/dist/components/Button.js +6 -2
  9. package/dist/components/Button.js.map +1 -1
  10. package/dist/components/Checkbox.d.ts +6 -0
  11. package/dist/components/Checkbox.d.ts.map +1 -1
  12. package/dist/components/Checkbox.js +6 -3
  13. package/dist/components/Checkbox.js.map +1 -1
  14. package/dist/components/Input.d.ts +30 -2
  15. package/dist/components/Input.d.ts.map +1 -1
  16. package/dist/components/Input.js +23 -7
  17. package/dist/components/Input.js.map +1 -1
  18. package/dist/components/Menu.d.ts +6 -0
  19. package/dist/components/Menu.d.ts.map +1 -1
  20. package/dist/components/Menu.js +11 -7
  21. package/dist/components/Menu.js.map +1 -1
  22. package/dist/components/NavItem.d.ts +4 -0
  23. package/dist/components/NavItem.d.ts.map +1 -1
  24. package/dist/components/NavItem.js +22 -2
  25. package/dist/components/NavItem.js.map +1 -1
  26. package/dist/components/Radio.d.ts +11 -0
  27. package/dist/components/Radio.d.ts.map +1 -1
  28. package/dist/components/Radio.js +25 -17
  29. package/dist/components/Radio.js.map +1 -1
  30. package/dist/components/ScrollProgress.d.ts.map +1 -1
  31. package/dist/components/ScrollProgress.js +1 -0
  32. package/dist/components/ScrollProgress.js.map +1 -1
  33. package/dist/components/Select.d.ts +11 -2
  34. package/dist/components/Select.d.ts.map +1 -1
  35. package/dist/components/Select.js +6 -3
  36. package/dist/components/Select.js.map +1 -1
  37. package/dist/components/Table.d.ts +26 -1
  38. package/dist/components/Table.d.ts.map +1 -1
  39. package/dist/components/Table.js +30 -7
  40. package/dist/components/Table.js.map +1 -1
  41. package/dist/components/Tabs.d.ts +7 -3
  42. package/dist/components/Tabs.d.ts.map +1 -1
  43. package/dist/components/Tabs.js +13 -2
  44. package/dist/components/Tabs.js.map +1 -1
  45. package/dist/components/Toggle.d.ts +6 -0
  46. package/dist/components/Toggle.d.ts.map +1 -1
  47. package/dist/components/Toggle.js +6 -3
  48. package/dist/components/Toggle.js.map +1 -1
  49. package/dist/components/dom-props.d.ts +59 -0
  50. package/dist/components/dom-props.d.ts.map +1 -1
  51. package/dist/components/dom-props.js +86 -0
  52. package/dist/components/dom-props.js.map +1 -1
  53. package/dist/components/index.d.ts +1 -1
  54. package/dist/components/index.d.ts.map +1 -1
  55. package/dist/components/index.js.map +1 -1
  56. package/dist/components/resolve-disabled.d.ts +9 -0
  57. package/dist/components/resolve-disabled.d.ts.map +1 -0
  58. package/dist/components/resolve-disabled.js +15 -0
  59. package/dist/components/resolve-disabled.js.map +1 -0
  60. package/dist/index.d.ts +5 -6
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +5 -6
  63. package/dist/index.js.map +1 -1
  64. package/dist/styles/index.css +154 -1
  65. package/dist/styles/table.css +10 -6
  66. package/dist/styles/tabs.css +12 -3
  67. package/dist/styles/tokens/base.css +8 -8
  68. package/dist/tokens-js.d.ts +12 -0
  69. package/dist/tokens-js.d.ts.map +1 -0
  70. package/dist/tokens-js.js +12 -0
  71. package/dist/tokens-js.js.map +1 -0
  72. package/package.json +7 -3
@@ -1,5 +1,7 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { forwardRef, useRef, useImperativeHandle } from 'react';
4
+ import { resolveDisabled } from './resolve-disabled.js';
3
5
  /**
4
6
  * Toggle is a checkbox with `role="switch"`.
5
7
  *
@@ -14,19 +16,20 @@ import { forwardRef, useRef, useImperativeHandle } from 'react';
14
16
  * ramps.
15
17
  */
16
18
  export const Toggle = forwardRef((props, forwardedRef) => {
17
- const { size = 'md', intent = 'brand', className, children, disabled, ...rest } = props;
19
+ const { size = 'md', intent = 'brand', className, children, isDisabled, disabled, ...rest } = props;
20
+ const resolvedDisabled = resolveDisabled(isDisabled, disabled);
18
21
  const domRef = useRef(null);
19
22
  useImperativeHandle(forwardedRef, () => domRef.current);
20
23
  const classNames = [
21
24
  'ion-toggle',
22
25
  size !== 'md' ? `ion-toggle--${size}` : '',
23
26
  intent !== 'brand' ? `ion-toggle--${intent}` : '',
24
- disabled ? 'ion-toggle--disabled' : '',
27
+ resolvedDisabled ? 'ion-toggle--disabled' : '',
25
28
  className || '',
26
29
  ]
27
30
  .filter(Boolean)
28
31
  .join(' ');
29
- return (_jsxs("label", { className: classNames, children: [_jsx("input", { ...rest, ref: domRef, type: "checkbox", role: "switch", disabled: disabled, className: "ion-toggle__input" }), _jsx("span", { className: "ion-toggle__track", "aria-hidden": "true", children: _jsx("span", { className: "ion-toggle__thumb" }) }), children && _jsx("span", { className: "ion-toggle__label", children: children })] }));
32
+ return (_jsxs("label", { className: classNames, children: [_jsx("input", { ...rest, ref: domRef, type: "checkbox", role: "switch", disabled: resolvedDisabled, className: "ion-toggle__input" }), _jsx("span", { className: "ion-toggle__track", "aria-hidden": "true", children: _jsx("span", { className: "ion-toggle__thumb" }) }), children && _jsx("span", { className: "ion-toggle__label", children: children })] }));
30
33
  });
31
34
  Toggle.displayName = 'Toggle';
32
35
  //# sourceMappingURL=Toggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toggle.js","sourceRoot":"","sources":["../../src/components/Toggle.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,UAAU,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAgBvE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE;IACtB,MAAM,EACJ,IAAI,GAAG,IAAI,EACX,MAAM,GAAG,OAAO,EAChB,SA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GAAG,QAAQ,CAAC"}
@@ -40,6 +40,65 @@
40
40
  * with.
41
41
  */
42
42
  export declare const ARIA_BUTTON_NON_DOM_PROPS: readonly ["onPress", "onPressStart", "onPressEnd", "onPressChange", "onPressUp", "onFocusChange", "excludeFromTabOrder", "preventFocusOnPress", "elementType", "href", "target", "rel"];
43
+ /**
44
+ * The same, for `AriaTextFieldProps` — Input's prop type.
45
+ *
46
+ * Input had the opposite defect to Button's: it destructured ten named props
47
+ * and never built a rest object at all, so nothing outside `AriaTextFieldProps`
48
+ * ever reached the `<input>`. `data-testid` and every other custom attribute
49
+ * vanished with no warning. Spreading the rest fixes that, but only if these
50
+ * come out first.
51
+ *
52
+ * Sources, as of react-aria 3.50:
53
+ * LabelableProps label
54
+ * HelpTextProps description, errorMessage
55
+ * InputBase isDisabled, isReadOnly
56
+ * Validation isRequired, isInvalid, validationState, validationBehavior,
57
+ * validate
58
+ * ValueBase onChange — takes a string, not an event; `useTextField`
59
+ * returns a real DOM handler in its place
60
+ * FocusEvents onFocusChange
61
+ * FocusableDOMProps excludeFromTabOrder
62
+ *
63
+ * Several of these Input already destructures by name; they are listed anyway
64
+ * so this reads as a complete statement about the type rather than a diff
65
+ * against one component's parameter list.
66
+ *
67
+ * `spellCheck` is the odd one out: a real input attribute, but React Aria types
68
+ * it as `string` where React wants `Booleanish`, so forwarding it from the rest
69
+ * spread does not typecheck. It is dropped rather than cast because
70
+ * `useTextField` already returns it — verified: `inputProps` carries the whole
71
+ * of `TextInputDOMProps`, `spellCheck` and `autoCorrect` included.
72
+ *
73
+ * `value` and `defaultValue` are here for a subtler reason than the rest.
74
+ * "`inputProps` is spread afterwards and wins" only holds for the SAME key —
75
+ * and `useTextField` always returns `value`, even when the caller passed
76
+ * `defaultValue`. Forwarding `defaultValue` therefore puts both on the element
77
+ * and React warns that the input is neither controlled nor uncontrolled. This
78
+ * was a real regression, caught by the Input stories, not a precaution.
79
+ *
80
+ * `placeholder`, `name`, `autoComplete` and `id` stay out of the list: they are
81
+ * single-key collisions, so `inputProps` genuinely does win.
82
+ */
83
+ export declare const ARIA_TEXT_FIELD_NON_DOM_PROPS: readonly ["label", "description", "errorMessage", "isDisabled", "isReadOnly", "isRequired", "isInvalid", "validationState", "validationBehavior", "validate", "onChange", "onFocusChange", "excludeFromTabOrder", "spellCheck", "value", "defaultValue"];
84
+ /**
85
+ * The same, for `AriaTabListProps` — Tabs' prop type.
86
+ *
87
+ * Tabs previously forwarded its leftover props only into the Aria/Stately
88
+ * hooks, so HTML attributes like `data-testid` never reached the root. The
89
+ * list below is what must stay off the DOM when the rest is spread onto the
90
+ * outer element; the hooks still see the full object.
91
+ *
92
+ * Sources, as of react-aria / react-stately 3.50:
93
+ * CollectionBase children, items, disabledKeys
94
+ * TabListProps isDisabled, selectedKey, defaultSelectedKey,
95
+ * onSelectionChange
96
+ * AriaTabListProps keyboardActivation, orientation
97
+ *
98
+ * `id`, `aria-*` and other `DOMProps` / `AriaLabelingProps` members are valid
99
+ * on the root and are deliberately absent.
100
+ */
101
+ export declare const ARIA_TAB_LIST_NON_DOM_PROPS: readonly ["children", "items", "disabledKeys", "isDisabled", "selectedKey", "defaultSelectedKey", "onSelectionChange", "keyboardActivation", "orientation"];
43
102
  /**
44
103
  * Returns `props` without `keys`, leaving `props` untouched.
45
104
  *
@@ -1 +1 @@
1
- {"version":3,"file":"dom-props.d.ts","sourceRoot":"","sources":["../../src/components/dom-props.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,yBAAyB,yLAa2B,CAAC;AAElE;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,SAAS,WAAW,EAAE,EAC1E,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,CAAC,GACN,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAIpB"}
1
+ {"version":3,"file":"dom-props.d.ts","sourceRoot":"","sources":["../../src/components/dom-props.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,yBAAyB,yLAa2B,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,6BAA6B,0PAiBgB,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,2BAA2B,6JAUwB,CAAC;AAEjE;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,SAAS,WAAW,EAAE,EAC1E,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,CAAC,GACN,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAIpB"}
@@ -53,6 +53,92 @@ export const ARIA_BUTTON_NON_DOM_PROPS = [
53
53
  'target',
54
54
  'rel',
55
55
  ];
56
+ /**
57
+ * The same, for `AriaTextFieldProps` — Input's prop type.
58
+ *
59
+ * Input had the opposite defect to Button's: it destructured ten named props
60
+ * and never built a rest object at all, so nothing outside `AriaTextFieldProps`
61
+ * ever reached the `<input>`. `data-testid` and every other custom attribute
62
+ * vanished with no warning. Spreading the rest fixes that, but only if these
63
+ * come out first.
64
+ *
65
+ * Sources, as of react-aria 3.50:
66
+ * LabelableProps label
67
+ * HelpTextProps description, errorMessage
68
+ * InputBase isDisabled, isReadOnly
69
+ * Validation isRequired, isInvalid, validationState, validationBehavior,
70
+ * validate
71
+ * ValueBase onChange — takes a string, not an event; `useTextField`
72
+ * returns a real DOM handler in its place
73
+ * FocusEvents onFocusChange
74
+ * FocusableDOMProps excludeFromTabOrder
75
+ *
76
+ * Several of these Input already destructures by name; they are listed anyway
77
+ * so this reads as a complete statement about the type rather than a diff
78
+ * against one component's parameter list.
79
+ *
80
+ * `spellCheck` is the odd one out: a real input attribute, but React Aria types
81
+ * it as `string` where React wants `Booleanish`, so forwarding it from the rest
82
+ * spread does not typecheck. It is dropped rather than cast because
83
+ * `useTextField` already returns it — verified: `inputProps` carries the whole
84
+ * of `TextInputDOMProps`, `spellCheck` and `autoCorrect` included.
85
+ *
86
+ * `value` and `defaultValue` are here for a subtler reason than the rest.
87
+ * "`inputProps` is spread afterwards and wins" only holds for the SAME key —
88
+ * and `useTextField` always returns `value`, even when the caller passed
89
+ * `defaultValue`. Forwarding `defaultValue` therefore puts both on the element
90
+ * and React warns that the input is neither controlled nor uncontrolled. This
91
+ * was a real regression, caught by the Input stories, not a precaution.
92
+ *
93
+ * `placeholder`, `name`, `autoComplete` and `id` stay out of the list: they are
94
+ * single-key collisions, so `inputProps` genuinely does win.
95
+ */
96
+ export const ARIA_TEXT_FIELD_NON_DOM_PROPS = [
97
+ 'label',
98
+ 'description',
99
+ 'errorMessage',
100
+ 'isDisabled',
101
+ 'isReadOnly',
102
+ 'isRequired',
103
+ 'isInvalid',
104
+ 'validationState',
105
+ 'validationBehavior',
106
+ 'validate',
107
+ 'onChange',
108
+ 'onFocusChange',
109
+ 'excludeFromTabOrder',
110
+ 'spellCheck',
111
+ 'value',
112
+ 'defaultValue',
113
+ ];
114
+ /**
115
+ * The same, for `AriaTabListProps` — Tabs' prop type.
116
+ *
117
+ * Tabs previously forwarded its leftover props only into the Aria/Stately
118
+ * hooks, so HTML attributes like `data-testid` never reached the root. The
119
+ * list below is what must stay off the DOM when the rest is spread onto the
120
+ * outer element; the hooks still see the full object.
121
+ *
122
+ * Sources, as of react-aria / react-stately 3.50:
123
+ * CollectionBase children, items, disabledKeys
124
+ * TabListProps isDisabled, selectedKey, defaultSelectedKey,
125
+ * onSelectionChange
126
+ * AriaTabListProps keyboardActivation, orientation
127
+ *
128
+ * `id`, `aria-*` and other `DOMProps` / `AriaLabelingProps` members are valid
129
+ * on the root and are deliberately absent.
130
+ */
131
+ export const ARIA_TAB_LIST_NON_DOM_PROPS = [
132
+ 'children',
133
+ 'items',
134
+ 'disabledKeys',
135
+ 'isDisabled',
136
+ 'selectedKey',
137
+ 'defaultSelectedKey',
138
+ 'onSelectionChange',
139
+ 'keyboardActivation',
140
+ 'orientation',
141
+ ];
56
142
  /**
57
143
  * Returns `props` without `keys`, leaving `props` untouched.
58
144
  *
@@ -1 +1 @@
1
- {"version":3,"file":"dom-props.js","sourceRoot":"","sources":["../../src/components/dom-props.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,cAAc;IACd,YAAY;IACZ,eAAe;IACf,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,qBAAqB;IACrB,aAAa;IACb,MAAM;IACN,QAAQ;IACR,KAAK;CAC0D,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,KAAQ,EACR,IAAO;IAEP,MAAM,MAAM,GAAG,EAAE,GAAG,KAAK,EAAkC,CAAC;IAC5D,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3C,OAAO,MAA4B,CAAC;AACtC,CAAC"}
1
+ {"version":3,"file":"dom-props.js","sourceRoot":"","sources":["../../src/components/dom-props.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,SAAS;IACT,cAAc;IACd,YAAY;IACZ,eAAe;IACf,WAAW;IACX,eAAe;IACf,qBAAqB;IACrB,qBAAqB;IACrB,aAAa;IACb,MAAM;IACN,QAAQ;IACR,KAAK;CAC0D,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,OAAO;IACP,aAAa;IACb,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,iBAAiB;IACjB,oBAAoB;IACpB,UAAU;IACV,UAAU;IACV,eAAe;IACf,qBAAqB;IACrB,YAAY;IACZ,OAAO;IACP,cAAc;CAC0C,CAAC;AAE3D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,UAAU;IACV,OAAO;IACP,cAAc;IACd,YAAY;IACZ,aAAa;IACb,oBAAoB;IACpB,mBAAmB;IACnB,oBAAoB;IACpB,aAAa;CACiD,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CACvB,KAAQ,EACR,IAAO;IAEP,MAAM,MAAM,GAAG,EAAE,GAAG,KAAK,EAAkC,CAAC;IAC5D,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IAC3C,OAAO,MAA4B,CAAC;AACtC,CAAC"}
@@ -27,7 +27,7 @@ export type { DividerProps, DividerOrientation } from './Divider.js';
27
27
  export { NavItem } from './NavItem.js';
28
28
  export type { NavItemProps } from './NavItem.js';
29
29
  export { Table, TableHead, TableBody, TableRow, TableCell } from './Table.js';
30
- export type { TableProps, TableDensity, TableRowProps, TableCellProps, TableCellAlign, } from './Table.js';
30
+ export type { TableProps, TableDensity, TableRowProps, TableRowSelection, TableCellProps, TableCellAlign, TableCellScope, } from './Table.js';
31
31
  export { ScrollProgress } from './ScrollProgress.js';
32
32
  export type { ScrollProgressProps, ScrollProgressSection, } from './ScrollProgress.js';
33
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE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ources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAMzC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAO/C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAOlD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAO3C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAU9E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Disabled-prop resolution for the library-wide `isDisabled` convention.
3
+ *
4
+ * Canonical name is React Aria's `isDisabled`. Native `disabled` remains
5
+ * accepted as a deprecated alias for one minor so callers are not broken on
6
+ * the rename. When both are passed, `isDisabled` wins.
7
+ */
8
+ export declare function resolveDisabled(isDisabled?: boolean, disabled?: boolean): boolean | undefined;
9
+ //# sourceMappingURL=resolve-disabled.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-disabled.d.ts","sourceRoot":"","sources":["../../src/components/resolve-disabled.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,UAAU,CAAC,EAAE,OAAO,EACpB,QAAQ,CAAC,EAAE,OAAO,GACjB,OAAO,GAAG,SAAS,CAIrB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Disabled-prop resolution for the library-wide `isDisabled` convention.
3
+ *
4
+ * Canonical name is React Aria's `isDisabled`. Native `disabled` remains
5
+ * accepted as a deprecated alias for one minor so callers are not broken on
6
+ * the rename. When both are passed, `isDisabled` wins.
7
+ */
8
+ export function resolveDisabled(isDisabled, disabled) {
9
+ if (isDisabled !== undefined)
10
+ return isDisabled;
11
+ if (disabled !== undefined)
12
+ return disabled;
13
+ return undefined;
14
+ }
15
+ //# sourceMappingURL=resolve-disabled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-disabled.js","sourceRoot":"","sources":["../../src/components/resolve-disabled.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,UAAoB,EACpB,QAAkB;IAElB,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,UAAU,CAAC;IAChD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -9,17 +9,16 @@
9
9
  *
10
10
  * import 'ionbase-ui/styles'; // tokens + components, one import
11
11
  * import { Button, Icon } from 'ionbase-ui';
12
+ * import { semantic } from 'ionbase-ui/tokens-js'; // JS token values
12
13
  *
13
14
  * Icons are not bundled. `Icon` takes the icon as a prop, so any SVG component
14
15
  * works — lucide-react, heroicons, react-icons, your own. See ./Icon.tsx.
16
+ *
17
+ * JS token values used to re-export from this barrel as `tokens`. That pulled
18
+ * ~48KB into any consumer whose bundler does not tree-shake a namespace
19
+ * re-export. They live at `ionbase-ui/tokens-js` now.
15
20
  */
16
21
  export * from './components/index.js';
17
22
  export { Icon } from './Icon.js';
18
23
  export type { IconProps, IconSize } from './Icon.js';
19
- /**
20
- * Generated token values, as `var(--…)` references. Copied in from the token
21
- * pipeline at build time by scripts/sync-tokens.mjs — never hand-edited, and
22
- * git-ignored, because Figma owns these names and values.
23
- */
24
- export * as tokens from './tokens/index.js';
25
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErD;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
package/dist/index.js CHANGED
@@ -9,16 +9,15 @@
9
9
  *
10
10
  * import 'ionbase-ui/styles'; // tokens + components, one import
11
11
  * import { Button, Icon } from 'ionbase-ui';
12
+ * import { semantic } from 'ionbase-ui/tokens-js'; // JS token values
12
13
  *
13
14
  * Icons are not bundled. `Icon` takes the icon as a prop, so any SVG component
14
15
  * works — lucide-react, heroicons, react-icons, your own. See ./Icon.tsx.
16
+ *
17
+ * JS token values used to re-export from this barrel as `tokens`. That pulled
18
+ * ~48KB into any consumer whose bundler does not tree-shake a namespace
19
+ * re-export. They live at `ionbase-ui/tokens-js` now.
15
20
  */
16
21
  export * from './components/index.js';
17
22
  export { Icon } from './Icon.js';
18
- /**
19
- * Generated token values, as `var(--…)` references. Copied in from the token
20
- * pipeline at build time by scripts/sync-tokens.mjs — never hand-edited, and
21
- * git-ignored, because Figma owns these names and values.
22
- */
23
- export * as tokens from './tokens/index.js';
24
23
  //# 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;;;;;;;;;;;;;;GAcG;AACH,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC;;;;GAIG;AACH,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,cAAc,uBAAuB,CAAC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC"}
@@ -1,4 +1,24 @@
1
- @import url('https://fonts.googleapis.com/css2?family=Host+Grotesk:ital,wght@0,300..800;1,300..800&family=Merriweather:ital,wght@0,300..900;1,300..900&family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&family=STIX+Two+Text:ital,wght@0,400..700;1,400..700&display=swap');
1
+ /*
2
+ * NO @import of a webfont host here, deliberately. Loading the fonts is the
3
+ * consuming app's job — see "Fonts" in the README.
4
+ *
5
+ * This file used to open with a Google Fonts @import, and it was broken for
6
+ * every consumer using a bundler. CSS requires @import to precede all other
7
+ * rules; a bundler that concatenates stylesheets puts other rules ahead of it,
8
+ * and the browser then drops it silently. Confirmed in a Next.js 16 /
9
+ * Turbopack app: the built bundle contained no @import and no
10
+ * `fonts.googleapis` string at all, so no font ever loaded.
11
+ *
12
+ * It failed quietly rather than loudly. The font tokens named bare families
13
+ * with no generic fallback, so the unresolved families fell through to the
14
+ * browser default and the whole system rendered in a default serif — which
15
+ * reads as a token bug, not a font-loading one. The fallbacks added to
16
+ * token-overrides.json are what makes that failure mode legible.
17
+ *
18
+ * Reaching a third-party host at CSS parse time was also the wrong default
19
+ * regardless: it is a render-blocking request the consumer did not opt into,
20
+ * it bypasses next/font and friends, and it hands visitor IPs to Google.
21
+ */
2
22
  @import url('./tokens/index.css');
3
23
  @import url('./button.css');
4
24
  @import url('./tabs.css');
@@ -42,3 +62,136 @@ body {
42
62
  -webkit-font-smoothing: antialiased;
43
63
  -moz-osx-font-smoothing: grayscale;
44
64
  }
65
+
66
+ /*
67
+ * Reduced motion — WCAG 2.3.3.
68
+ *
69
+ * Ten component stylesheets carry transitions; none of them individually
70
+ * gated on the query. One global block covers every `ion-*` rule rather than
71
+ * duplicating the media query ten times. `0.01ms` rather than `0` so the
72
+ * browser still fires `transitionend` / `animationend` for anything that
73
+ * listens.
74
+ */
75
+ @media (prefers-reduced-motion: reduce) {
76
+ [class^='ion-'],
77
+ [class*=' ion-'],
78
+ [class^='ion-'] *,
79
+ [class*=' ion-'] * {
80
+ animation-duration: 0.01ms !important;
81
+ animation-iteration-count: 1 !important;
82
+ transition-duration: 0.01ms !important;
83
+ scroll-behavior: auto !important;
84
+ }
85
+ }
86
+
87
+ /*
88
+ * Forced colours — Windows High Contrast / WCAG 1.4.11.
89
+ *
90
+ * Components that convey state with background or border tokens flatten to
91
+ * unreadable blocks when the OS remaps colour. Re-express those states with
92
+ * system colour keywords so selected, checked, focused and disabled remain
93
+ * distinguishable. `forced-color-adjust: none` only where the system would
94
+ * otherwise erase a fill the mark depends on (checked boxes, selected pills).
95
+ */
96
+ @media (forced-colors: active) {
97
+ .ion-button:focus-visible,
98
+ .ion-button[data-focused='true'],
99
+ .ion-nav-item:focus-visible,
100
+ .ion-nav-item[data-focused='true'],
101
+ .ion-tabs__item:focus-visible,
102
+ .ion-tabs__item[data-focused='true'],
103
+ .ion-tabs__panel:focus-visible,
104
+ .ion-menu__item:focus-visible,
105
+ .ion-input:focus-within,
106
+ .ion-select:focus-within,
107
+ .ion-scroll-progress__trigger:focus-visible,
108
+ .ion-scroll-progress__heading:focus-visible,
109
+ .ion-table-container:focus-visible {
110
+ outline: var(--border-width-thick) solid Highlight;
111
+ outline-offset: 2px;
112
+ }
113
+
114
+ .ion-checkbox__input:focus-visible + .ion-checkbox__indicator,
115
+ .ion-checkbox[data-focused='true'] .ion-checkbox__indicator,
116
+ .ion-radio__input:focus-visible + .ion-radio__indicator,
117
+ .ion-radio[data-focused='true'] .ion-radio__indicator,
118
+ .ion-toggle__input:focus-visible + .ion-toggle__track,
119
+ .ion-toggle[data-focused='true'] .ion-toggle__track {
120
+ outline: var(--border-width-thick) solid Highlight;
121
+ outline-offset: 2px;
122
+ }
123
+
124
+ /* Checked / selected before disabled so specificity reads non-decreasing. */
125
+ .ion-checkbox__input:checked + .ion-checkbox__indicator,
126
+ .ion-checkbox__input:indeterminate + .ion-checkbox__indicator,
127
+ .ion-radio__input:checked + .ion-radio__indicator,
128
+ .ion-toggle__input:checked + .ion-toggle__track {
129
+ forced-color-adjust: none;
130
+ background-color: Highlight;
131
+ border-color: Highlight;
132
+ }
133
+
134
+ .ion-checkbox__input:checked + .ion-checkbox__indicator .ion-checkbox__mark,
135
+ .ion-checkbox__input:indeterminate
136
+ + .ion-checkbox__indicator
137
+ .ion-checkbox__mark {
138
+ forced-color-adjust: none;
139
+ color: HighlightText;
140
+ }
141
+
142
+ .ion-radio__input:checked + .ion-radio__indicator .ion-radio__dot {
143
+ forced-color-adjust: none;
144
+ background-color: HighlightText;
145
+ }
146
+
147
+ .ion-toggle__input:checked + .ion-toggle__track .ion-toggle__thumb {
148
+ forced-color-adjust: none;
149
+ background-color: HighlightText;
150
+ }
151
+
152
+ .ion-table tbody tr[data-selected='true'] {
153
+ forced-color-adjust: none;
154
+ background-color: Highlight;
155
+ color: HighlightText;
156
+ }
157
+
158
+ .ion-tabs__item--underline[data-selected='true'] {
159
+ border-bottom-color: Highlight;
160
+ }
161
+
162
+ .ion-tabs__item--pill[data-selected='true'] {
163
+ forced-color-adjust: none;
164
+ background-color: Highlight;
165
+ color: HighlightText;
166
+ }
167
+
168
+ .ion-button:disabled,
169
+ .ion-button[data-disabled='true'],
170
+ .ion-nav-item--disabled,
171
+ .ion-nav-item[data-disabled='true'],
172
+ .ion-tabs__item[data-disabled='true'],
173
+ .ion-menu__item:disabled,
174
+ .ion-menu__item[data-disabled='true'],
175
+ .ion-input[data-disabled='true'],
176
+ .ion-select[data-disabled='true'],
177
+ .ion-checkbox--disabled,
178
+ .ion-checkbox[data-disabled='true'],
179
+ .ion-radio--disabled,
180
+ .ion-radio[data-disabled='true'],
181
+ .ion-toggle--disabled,
182
+ .ion-toggle[data-disabled='true'] {
183
+ color: GrayText;
184
+ border-color: GrayText;
185
+ }
186
+
187
+ .ion-checkbox__input:disabled + .ion-checkbox__indicator,
188
+ .ion-checkbox__input:checked:disabled + .ion-checkbox__indicator,
189
+ .ion-checkbox__input:indeterminate:disabled + .ion-checkbox__indicator,
190
+ .ion-radio__input:disabled + .ion-radio__indicator,
191
+ .ion-radio__input:checked:disabled + .ion-radio__indicator,
192
+ .ion-toggle__input:disabled + .ion-toggle__track,
193
+ .ion-toggle__input:checked:disabled + .ion-toggle__track {
194
+ border-color: GrayText;
195
+ background-color: Canvas;
196
+ }
197
+ }
@@ -37,6 +37,12 @@
37
37
  border-radius: var(--radius-md);
38
38
  }
39
39
 
40
+ /* Keyboard focus ring for the scroll region — see Table.tsx. */
41
+ .ion-table-container:focus-visible {
42
+ outline: var(--border-width-thick) solid var(--border-focus);
43
+ outline-offset: 2px;
44
+ }
45
+
40
46
  .ion-table {
41
47
  width: 100%;
42
48
  border-collapse: collapse;
@@ -83,12 +89,10 @@
83
89
  * inside `<thead>`.
84
90
  *
85
91
  * The `<th>` half is the Figma binding (see the header). The `thead` half
86
- * exists because a header row can legitimately contain a cell that is not a
87
- * column header — a selection-checkbox column has nothing to label, and an
88
- * empty `<th>` is an accessibility failure rather than a neutral one: axe's
89
- * `empty-table-header` flags it, and `aria-label` does not rescue it, since the
90
- * rule is specifically about text a sighted screen-reader user can also see.
91
- * Such a cell should be a `<td>`, which then still needs to look like a header.
92
+ * exists for cells that sit in the header row but are not column headers —
93
+ * rare, and mostly historical. Selection's select-all cell is a real `<th
94
+ * scope="col">` with a labelled checkbox, so it gets the fill from the `<th>`
95
+ * rule rather than this fallback.
92
96
  *
93
97
  * Declared after `.ion-table td` so specificity reads non-decreasing; the two
94
98
  * `td` selectors would otherwise trip `no-descending-specificity`.
@@ -9,9 +9,13 @@
9
9
  * variables rather than restating five declarations, and the icon rule needs no
10
10
  * per-size override.
11
11
  *
12
- * Only the horizontal orientation is implemented. Figma also defines vertical;
13
- * the track modifier is named `--horizontal` so vertical is additive rather
14
- * than a rename.
12
+ * Vertical is STRUCTURAL ONLY. `--vertical` stacks the track and stretches the
13
+ * items, which is what the word means and needs no design input. Its
14
+ * decoration does: the underline rule is a `border-bottom` and the pill track's
15
+ * padding is written for the horizontal axis, and which edge the underline
16
+ * moves to is Figma's call, not this file's. Until that is specified, a
17
+ * vertical track is correctly stacked, correctly navigable and correctly
18
+ * announced, but wears the horizontal type styling.
15
19
  */
16
20
 
17
21
  /* Track */
@@ -23,6 +27,11 @@
23
27
  padding: 0;
24
28
  }
25
29
 
30
+ .ion-tabs__track--vertical {
31
+ flex-direction: column;
32
+ align-items: stretch;
33
+ }
34
+
26
35
  .ion-tabs__track--underline.ion-tabs__track--horizontal {
27
36
  display: inline-flex;
28
37
  gap: var(--spacing-4);
@@ -122,14 +122,14 @@
122
122
  --font-size-56: 56px;
123
123
  --font-size-64: 64px;
124
124
  --font-size-72: 72px;
125
- --font-family-host-grotesk: Host Grotesk;
126
- --font-family-merriweather: Merriweather;
127
- --font-family-space-mono: Space Mono;
128
- --font-family-stix-two-text: STIX Two Text;
129
- --font-family-sans: Host Grotesk;
130
- --font-family-serif: Merriweather;
131
- --font-family-mono: Space Mono;
132
- --font-family-serif-display: STIX Two Text;
125
+ --font-family-host-grotesk: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
126
+ --font-family-merriweather: Merriweather, Georgia, "Times New Roman", serif;
127
+ --font-family-space-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
128
+ --font-family-stix-two-text: "STIX Two Text", Georgia, "Times New Roman", serif;
129
+ --font-family-sans: "Host Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
130
+ --font-family-serif: Merriweather, Georgia, "Times New Roman", serif;
131
+ --font-family-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
132
+ --font-family-serif-display: "STIX Two Text", Georgia, "Times New Roman", serif;
133
133
  --font-weight-400: 400;
134
134
  --font-weight-500: 500;
135
135
  --font-weight-600: 600;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * JS token values as `var(--…)` string references.
3
+ *
4
+ * Prefer this subpath over the main barrel so importing a component does not
5
+ * pull ~48KB of token JSON into bundlers that do not tree-shake:
6
+ *
7
+ * import { semantic, tokens } from 'ionbase-ui/tokens-js';
8
+ *
9
+ * CSS custom properties stay at `ionbase-ui/tokens` / `ionbase-ui/styles`.
10
+ */
11
+ export * from './tokens/index.js';
12
+ //# sourceMappingURL=tokens-js.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens-js.d.ts","sourceRoot":"","sources":["../src/tokens-js.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * JS token values as `var(--…)` string references.
3
+ *
4
+ * Prefer this subpath over the main barrel so importing a component does not
5
+ * pull ~48KB of token JSON into bundlers that do not tree-shake:
6
+ *
7
+ * import { semantic, tokens } from 'ionbase-ui/tokens-js';
8
+ *
9
+ * CSS custom properties stay at `ionbase-ui/tokens` / `ionbase-ui/styles`.
10
+ */
11
+ export * from './tokens/index.js';
12
+ //# sourceMappingURL=tokens-js.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tokens-js.js","sourceRoot":"","sources":["../src/tokens-js.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,cAAc,mBAAmB,CAAC"}