@react-md/core 6.0.2 → 6.2.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 (230) hide show
  1. package/dist/RootHtml.d.ts +1 -1
  2. package/dist/RootHtml.js.map +1 -1
  3. package/dist/_base.scss +6 -2
  4. package/dist/_border-radius.scss +92 -0
  5. package/dist/_core.scss +2 -0
  6. package/dist/_spacing.scss +86 -0
  7. package/dist/app-bar/_app-bar.scss +9 -7
  8. package/dist/app-bar/styles.js +1 -1
  9. package/dist/app-bar/styles.js.map +1 -1
  10. package/dist/autocomplete/defaults.d.ts +1 -0
  11. package/dist/autocomplete/defaults.js +2 -6
  12. package/dist/autocomplete/defaults.js.map +1 -1
  13. package/dist/autocomplete/types.d.ts +9 -9
  14. package/dist/autocomplete/types.js.map +1 -1
  15. package/dist/avatar/Avatar.d.ts +1 -1
  16. package/dist/avatar/Avatar.js +1 -1
  17. package/dist/avatar/Avatar.js.map +1 -1
  18. package/dist/avatar/_avatar.scss +3 -3
  19. package/dist/avatar/styles.d.ts +29 -1
  20. package/dist/avatar/styles.js.map +1 -1
  21. package/dist/badge/_badge.scss +10 -2
  22. package/dist/box/_box.scss +78 -11
  23. package/dist/box/styles.d.ts +26 -3
  24. package/dist/box/styles.js.map +1 -1
  25. package/dist/button/AsyncButton.d.ts +2 -2
  26. package/dist/button/AsyncButton.js.map +1 -1
  27. package/dist/button/Button.d.ts +1 -1
  28. package/dist/button/Button.js.map +1 -1
  29. package/dist/button/_button.scss +21 -11
  30. package/dist/card/CardHeader.d.ts +1 -1
  31. package/dist/card/CardHeader.js.map +1 -1
  32. package/dist/card/_card.scss +9 -7
  33. package/dist/chip/Chip.d.ts +1 -1
  34. package/dist/chip/Chip.js.map +1 -1
  35. package/dist/chip/_chip.scss +9 -7
  36. package/dist/dialog/Dialog.d.ts +1 -1
  37. package/dist/dialog/Dialog.js.map +1 -1
  38. package/dist/dialog/_dialog.scss +7 -6
  39. package/dist/divider/_divider.scss +3 -2
  40. package/dist/expansion-panel/ExpansionPanel.d.ts +1 -1
  41. package/dist/expansion-panel/ExpansionPanel.js.map +1 -1
  42. package/dist/expansion-panel/ExpansionPanelHeader.d.ts +1 -1
  43. package/dist/expansion-panel/ExpansionPanelHeader.js.map +1 -1
  44. package/dist/expansion-panel/_expansion-panel.scss +4 -3
  45. package/dist/files/FileInput.d.ts +1 -1
  46. package/dist/files/FileInput.js.map +1 -1
  47. package/dist/form/FormMessageContainer.d.ts +1 -1
  48. package/dist/form/FormMessageContainer.js.map +1 -1
  49. package/dist/form/InputToggle.d.ts +2 -2
  50. package/dist/form/InputToggle.js.map +1 -1
  51. package/dist/form/NativeSelect.d.ts +1 -1
  52. package/dist/form/NativeSelect.js.map +1 -1
  53. package/dist/form/OptGroup.d.ts +1 -1
  54. package/dist/form/OptGroup.js.map +1 -1
  55. package/dist/form/Password.d.ts +1 -1
  56. package/dist/form/Password.js.map +1 -1
  57. package/dist/form/Select.d.ts +2 -2
  58. package/dist/form/Select.js.map +1 -1
  59. package/dist/form/Slider.d.ts +1 -1
  60. package/dist/form/Slider.js.map +1 -1
  61. package/dist/form/Switch.d.ts +3 -3
  62. package/dist/form/Switch.js.map +1 -1
  63. package/dist/form/SwitchTrack.d.ts +1 -1
  64. package/dist/form/SwitchTrack.js.map +1 -1
  65. package/dist/form/TextArea.d.ts +2 -2
  66. package/dist/form/TextArea.js +1 -1
  67. package/dist/form/TextArea.js.map +1 -1
  68. package/dist/form/TextField.d.ts +1 -1
  69. package/dist/form/TextField.js.map +1 -1
  70. package/dist/form/_form-message.scss +4 -3
  71. package/dist/form/_input-toggle.scss +2 -1
  72. package/dist/form/_label.scss +3 -2
  73. package/dist/form/_password.scss +2 -1
  74. package/dist/form/_select.scss +4 -4
  75. package/dist/form/_slider.scss +4 -3
  76. package/dist/form/_switch.scss +2 -1
  77. package/dist/form/_text-area.scss +3 -2
  78. package/dist/form/_text-field.scss +20 -16
  79. package/dist/form/types.d.ts +5 -5
  80. package/dist/form/types.js.map +1 -1
  81. package/dist/form/utils.js +1 -0
  82. package/dist/form/utils.js.map +1 -1
  83. package/dist/icon/_icon.scss +2 -1
  84. package/dist/interaction/useElementInteraction.js +1 -1
  85. package/dist/interaction/useElementInteraction.js.map +1 -1
  86. package/dist/layout/LayoutAppBar.d.ts +1 -1
  87. package/dist/layout/LayoutAppBar.js.map +1 -1
  88. package/dist/layout/LayoutNav.js +1 -1
  89. package/dist/layout/LayoutNav.js.map +1 -1
  90. package/dist/layout/useMainTabIndex.js +1 -0
  91. package/dist/layout/useMainTabIndex.js.map +1 -1
  92. package/dist/link/_link.scss +3 -2
  93. package/dist/list/ListItemLink.d.ts +1 -1
  94. package/dist/list/ListItemLink.js.map +1 -1
  95. package/dist/list/ListItemText.d.ts +1 -1
  96. package/dist/list/ListItemText.js.map +1 -1
  97. package/dist/list/ListSubheader.d.ts +1 -1
  98. package/dist/list/ListSubheader.js.map +1 -1
  99. package/dist/list/_list.scss +7 -6
  100. package/dist/list/types.d.ts +2 -2
  101. package/dist/list/types.js.map +1 -1
  102. package/dist/menu/Menu.d.ts +3 -3
  103. package/dist/menu/Menu.js.map +1 -1
  104. package/dist/menu/MenuItemInputToggle.d.ts +2 -2
  105. package/dist/menu/MenuItemInputToggle.js.map +1 -1
  106. package/dist/menu/MenuItemTextField.d.ts +1 -1
  107. package/dist/menu/MenuItemTextField.js.map +1 -1
  108. package/dist/menu/MenuSheet.d.ts +1 -1
  109. package/dist/menu/MenuSheet.js.map +1 -1
  110. package/dist/menu/_menu.scss +2 -1
  111. package/dist/navigation/CollapsibleNavGroup.d.ts +2 -2
  112. package/dist/navigation/CollapsibleNavGroup.js.map +1 -1
  113. package/dist/navigation/NavItemLink.d.ts +1 -1
  114. package/dist/navigation/NavItemLink.js.map +1 -1
  115. package/dist/navigation/_navigation.scss +5 -3
  116. package/dist/progress/CircularProgress.d.ts +2 -17
  117. package/dist/progress/CircularProgress.js +19 -23
  118. package/dist/progress/CircularProgress.js.map +1 -1
  119. package/dist/progress/LinearProgress.d.ts +5 -1
  120. package/dist/progress/LinearProgress.js +13 -25
  121. package/dist/progress/LinearProgress.js.map +1 -1
  122. package/dist/progress/circularProgressStyles.d.ts +62 -0
  123. package/dist/progress/circularProgressStyles.js +38 -0
  124. package/dist/progress/circularProgressStyles.js.map +1 -0
  125. package/dist/progress/linearProgressStyles.d.ts +38 -0
  126. package/dist/progress/linearProgressStyles.js +38 -0
  127. package/dist/progress/linearProgressStyles.js.map +1 -0
  128. package/dist/responsive-item/_responsive-item.scss +2 -1
  129. package/dist/searching/caseInsensitive.d.ts +20 -4
  130. package/dist/searching/caseInsensitive.js +5 -1
  131. package/dist/searching/caseInsensitive.js.map +1 -1
  132. package/dist/searching/fuzzy.d.ts +3 -3
  133. package/dist/searching/fuzzy.js +5 -1
  134. package/dist/searching/fuzzy.js.map +1 -1
  135. package/dist/searching/utils.d.ts +2 -1
  136. package/dist/searching/utils.js +11 -2
  137. package/dist/searching/utils.js.map +1 -1
  138. package/dist/segmented-button/_segmented-button.scss +20 -13
  139. package/dist/sheet/_sheet.scss +2 -1
  140. package/dist/snackbar/Toast.d.ts +1 -1
  141. package/dist/snackbar/Toast.js.map +1 -1
  142. package/dist/snackbar/_snackbar.scss +12 -10
  143. package/dist/table/TableCell.d.ts +1 -1
  144. package/dist/table/TableCell.js.map +1 -1
  145. package/dist/table/TableCheckbox.d.ts +1 -1
  146. package/dist/table/TableCheckbox.js.map +1 -1
  147. package/dist/table/TableRadio.d.ts +1 -1
  148. package/dist/table/TableRadio.js.map +1 -1
  149. package/dist/table/_table.scss +5 -4
  150. package/dist/tabs/TabListScrollButton.d.ts +1 -1
  151. package/dist/tabs/TabListScrollButton.js.map +1 -1
  152. package/dist/tabs/_tabs.scss +7 -4
  153. package/dist/theme/utils.js +2 -2
  154. package/dist/theme/utils.js.map +1 -1
  155. package/dist/tooltip/_tooltip.scss +52 -25
  156. package/dist/transition/_transition.scss +2 -1
  157. package/dist/tree/TreeItem.d.ts +2 -2
  158. package/dist/tree/TreeItem.js.map +1 -1
  159. package/dist/tree/_tree.scss +1 -1
  160. package/dist/types.d.ts +29 -2
  161. package/dist/types.js +1 -1
  162. package/dist/types.js.map +1 -1
  163. package/dist/utils/alphaNumericSort.d.ts +9 -9
  164. package/dist/utils/alphaNumericSort.js +5 -1
  165. package/dist/utils/alphaNumericSort.js.map +1 -1
  166. package/dist/utils/bem.js +1 -1
  167. package/dist/utils/bem.js.map +1 -1
  168. package/dist/utils/parseCssLengthUnit.js +3 -0
  169. package/dist/utils/parseCssLengthUnit.js.map +1 -1
  170. package/package.json +13 -13
  171. package/src/RootHtml.tsx +1 -1
  172. package/src/app-bar/styles.ts +1 -1
  173. package/src/autocomplete/defaults.ts +5 -12
  174. package/src/autocomplete/types.ts +9 -12
  175. package/src/avatar/Avatar.tsx +2 -2
  176. package/src/avatar/styles.ts +53 -1
  177. package/src/box/styles.ts +34 -13
  178. package/src/button/AsyncButton.tsx +2 -2
  179. package/src/button/Button.tsx +1 -1
  180. package/src/card/CardHeader.tsx +1 -1
  181. package/src/chip/Chip.tsx +1 -1
  182. package/src/dialog/Dialog.tsx +1 -4
  183. package/src/expansion-panel/ExpansionPanel.tsx +1 -1
  184. package/src/expansion-panel/ExpansionPanelHeader.tsx +1 -1
  185. package/src/files/FileInput.tsx +1 -4
  186. package/src/form/FormMessageContainer.tsx +1 -1
  187. package/src/form/InputToggle.tsx +2 -5
  188. package/src/form/NativeSelect.tsx +1 -1
  189. package/src/form/OptGroup.tsx +1 -4
  190. package/src/form/Password.tsx +1 -1
  191. package/src/form/Select.tsx +2 -3
  192. package/src/form/Slider.tsx +1 -1
  193. package/src/form/Switch.tsx +3 -3
  194. package/src/form/SwitchTrack.tsx +1 -1
  195. package/src/form/TextArea.tsx +3 -6
  196. package/src/form/TextField.tsx +1 -1
  197. package/src/form/types.ts +5 -15
  198. package/src/form/utils.ts +1 -0
  199. package/src/interaction/useElementInteraction.tsx +1 -1
  200. package/src/layout/LayoutAppBar.tsx +1 -1
  201. package/src/layout/LayoutNav.tsx +1 -1
  202. package/src/layout/useMainTabIndex.ts +1 -0
  203. package/src/list/ListItemLink.tsx +1 -1
  204. package/src/list/ListItemText.tsx +1 -4
  205. package/src/list/ListSubheader.tsx +1 -1
  206. package/src/list/types.ts +2 -5
  207. package/src/menu/Menu.tsx +3 -4
  208. package/src/menu/MenuItemInputToggle.tsx +2 -2
  209. package/src/menu/MenuItemTextField.tsx +1 -1
  210. package/src/menu/MenuSheet.tsx +1 -1
  211. package/src/navigation/CollapsibleNavGroup.tsx +2 -2
  212. package/src/navigation/NavItemLink.tsx +1 -1
  213. package/src/progress/CircularProgress.tsx +31 -53
  214. package/src/progress/LinearProgress.tsx +27 -40
  215. package/src/progress/circularProgressStyles.ts +114 -0
  216. package/src/progress/linearProgressStyles.ts +90 -0
  217. package/src/searching/caseInsensitive.ts +29 -7
  218. package/src/searching/fuzzy.ts +12 -6
  219. package/src/searching/utils.ts +13 -2
  220. package/src/snackbar/Toast.tsx +1 -1
  221. package/src/table/TableCell.tsx +1 -4
  222. package/src/table/TableCheckbox.tsx +1 -1
  223. package/src/table/TableRadio.tsx +1 -1
  224. package/src/tabs/TabListScrollButton.tsx +1 -1
  225. package/src/theme/utils.ts +2 -1
  226. package/src/tree/TreeItem.tsx +2 -2
  227. package/src/types.ts +44 -2
  228. package/src/utils/alphaNumericSort.ts +17 -11
  229. package/src/utils/bem.ts +1 -1
  230. package/src/utils/parseCssLengthUnit.ts +4 -0
@@ -5,6 +5,7 @@
5
5
  @use "sass:map";
6
6
  @use "sass:color";
7
7
  @use "../utils";
8
+ @use "../spacing";
8
9
  @use "../icon/icon";
9
10
  @use "../interaction/interaction";
10
11
  @use "../typography/typography";
@@ -69,7 +70,7 @@ $dark-theme-selected-color: a11y.contrast-color(
69
70
 
70
71
  /// The default gap to apply between the elements in the `SegmentedButton`.
71
72
  /// @type Number
72
- $gap: icon.$spacing !default;
73
+ $gap: spacing.get-var(sm) !default;
73
74
 
74
75
  /// The default border-radius to apply `SegmentedButton` that appear at the
75
76
  /// edges.
@@ -86,11 +87,11 @@ $min-width: 3rem !default;
86
87
 
87
88
  /// The default horizontal padding for a `SegmentedButton`.
88
89
  /// @type Number
89
- $horizontal-padding: 0.75rem !default;
90
+ $horizontal-padding: calc(spacing.get-var(sm) * 1.5) !default;
90
91
 
91
92
  /// The default vertical padding for a `SegmentedButton`.
92
93
  /// @type Number
93
- $vertical-padding: 0 !default;
94
+ $vertical-padding: spacing.get-var(none) !default;
94
95
 
95
96
  /// The default outline width for a `SegmentedButton`.
96
97
  /// @type Number
@@ -129,6 +130,9 @@ $typography-styles: typography.$button-styles !default;
129
130
  /// `get-var`, `set-var`, and `use-var` utils.
130
131
  /// @type List
131
132
  $variables: (
133
+ border-radius,
134
+ min-height,
135
+ min-width,
132
136
  outline-width,
133
137
  outline-color,
134
138
  color,
@@ -212,6 +216,7 @@ $variables: (
212
216
  /// Conditionally applies the css variables based on feature flags
213
217
  @mixin variables {
214
218
  @if not $disable-everything {
219
+ @include set-var(border-radius, $border-radius);
215
220
  @include set-var(outline-width, $outline-width);
216
221
  @include set-var(outline-color, $outline-color);
217
222
  @include set-var(color, currentcolor);
@@ -242,6 +247,8 @@ $variables: (
242
247
  @include icon.set-var(color, currentcolor);
243
248
  @include icon.set-var(size, 1.125rem);
244
249
  @include utils.map-to-styles($typography-styles);
250
+ @include use-var(min-height, $fallback: $min-height);
251
+ @include use-var(min-width, $fallback: $min-width);
245
252
 
246
253
  align-items: center;
247
254
  background-color: transparent;
@@ -250,30 +257,30 @@ $variables: (
250
257
  display: inline-flex;
251
258
  gap: $gap;
252
259
  justify-content: center;
253
- min-height: $min-height;
254
- min-width: $min-width;
255
260
  padding: $vertical-padding $horizontal-padding;
256
261
 
257
262
  &:first-child {
258
- border-bottom-left-radius: $border-radius;
259
- border-top-left-radius: $border-radius;
263
+ @include use-var(border-bottom-left-radius, border-radius);
264
+ @include use-var(border-top-left-radius, border-radius);
260
265
 
261
266
  @include utils.rtl {
267
+ @include use-var(border-bottom-right-radius, border-radius);
268
+ @include use-var(border-top-right-radius, border-radius);
269
+
262
270
  border-bottom-left-radius: 0;
263
- border-bottom-right-radius: $border-radius;
264
271
  border-top-left-radius: 0;
265
- border-top-right-radius: $border-radius;
266
272
  }
267
273
  }
268
274
 
269
275
  &:last-child {
270
- border-bottom-right-radius: $border-radius;
271
- border-top-right-radius: $border-radius;
276
+ @include use-var(border-bottom-right-radius, border-radius);
277
+ @include use-var(border-top-right-radius, border-radius);
272
278
 
273
279
  @include utils.rtl {
274
- border-bottom-left-radius: $border-radius;
280
+ @include use-var(border-bottom-left-radius, border-radius);
281
+ @include use-var(border-top-left-radius, border-radius);
282
+
275
283
  border-bottom-right-radius: 0;
276
- border-top-left-radius: $border-radius;
277
284
  border-top-right-radius: 0;
278
285
  }
279
286
  }
@@ -4,6 +4,7 @@
4
4
 
5
5
  @use "sass:map";
6
6
  @use "../utils";
7
+ @use "../spacing";
7
8
  @use "../box-shadows";
8
9
  @use "../media-queries/media-queries";
9
10
  @use "../transition/transition";
@@ -72,7 +73,7 @@ $static-width: 16rem !default;
72
73
  /// @see $touch-width
73
74
  /// @see $touch-max-height
74
75
  /// @type Number
75
- $touch-margin: 3.5rem !default;
76
+ $touch-margin: calc(spacing.get-var(md) * 3.5) !default;
76
77
 
77
78
  /// The default width for a `Sheet` on touch/phone devices.
78
79
  /// @type Number
@@ -71,7 +71,7 @@ export interface ConfigurableToastProps extends HTMLAttributes<HTMLDivElement>,
71
71
  * Any additional props that should be provided to the `<div>` that surrounds
72
72
  * the toast `children`.
73
73
  */
74
- contentProps?: PropsWithRef<ToastContentProps, HTMLDivElement>;
74
+ contentProps?: PropsWithRef<ToastContentProps>;
75
75
  /**
76
76
  * Set this to `true` if the `children` for the toast should no longer be
77
77
  * wrapped in an additional `<div>` that applies some toast layout styles.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/snackbar/Toast.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type AriaRole,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n forwardRef,\n isValidElement,\n} from \"react\";\n\nimport { type ButtonProps } from \"../button/Button.js\";\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport {\n type CSSTransitionClassNames,\n type TransitionCallbacks,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useScaleTransition } from \"../transition/useScaleTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { ToastActionButton } from \"./ToastActionButton.js\";\nimport { ToastCloseButton } from \"./ToastCloseButton.js\";\nimport { ToastContent, type ToastContentProps } from \"./ToastContent.js\";\nimport { toast } from \"./toastStyles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-toast-color\"?: string;\n \"--rmd-toast-background-color\"?: string;\n \"--rmd-toast-offset\"?: string | number;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ConfigurableToastProps\n extends HTMLAttributes<HTMLDivElement>,\n TransitionCallbacks {\n /**\n * Note: this default value will only be generated in the `Toast` component.\n *\n * @defaultValue `\"toast-\" + useId()`\n */\n id?: string;\n\n /**\n * Note: This is set while creating the toast.\n *\n * @defaultValue `visibleTime === null ? \"alert\" : \"status\"`\n */\n role?: AriaRole;\n\n /**\n * @defaultValue `\"surface\"`\n */\n theme?: BackgroundColor;\n\n /**\n * Set this to `true` to stack the content above the {@link action}. It is not\n * recommended to enable this prop if the {@link closeButton} is enabled.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * If this is not provided, a `ResizeObserver` will be used to determine if\n * there are multiple lines of content.\n */\n multiline?: boolean;\n\n /**\n * When this is a string or React element, it will be rendered as the\n * `children` within a `Button`\n */\n action?: ButtonProps | ReactElement | string;\n\n /**\n * This can be used to replace the custom action button behavior.\n */\n actionButton?: ReactNode;\n\n /**\n * @defaultValue `getIcon(\"close\")`\n */\n closeIcon?: ReactNode;\n\n /**\n * Set this to `true` if a close button should be rendered to the right of the\n * `children`.\n *\n * @defaultValue `!!closeButtonProps`\n */\n closeButton?: boolean;\n\n /**\n * Use this prop to override most of the close button behavior. The\n */\n closeButtonProps?: ButtonProps;\n\n /**\n * Any additional props that should be provided to the `<div>` that surrounds\n * the toast `children`.\n */\n contentProps?: PropsWithRef<ToastContentProps, HTMLDivElement>;\n\n /**\n * Set this to `true` if the `children` for the toast should no longer be\n * wrapped in an additional `<div>` that applies some toast layout styles.\n * This should normally only be used for custom `Toast` implementations.\n *\n * @see the `Snackbar`'s `renderToast` prop for an example.\n */\n disableToastContent?: boolean;\n\n /**\n * The toast's transition timeout for entering and exiting. This is **not**\n * how long the toast should remain visible.\n *\n * @defaultValue `SCALE_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n\n /**\n * The toast's transition class names for entering and exiting.\n *\n * @defaultValue `SCALE_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ToastProps extends ConfigurableToastProps {\n paused?: boolean;\n visible: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This component is just used for toast styling and does not implement any of\n * the visibility behavior.\n *\n * @see {@link https://react-md.dev/components/snackbar | Snackbar Demos}\n * @since 6.0.0\n */\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(\n function Toast(props, ref) {\n const {\n id: propId,\n className,\n timeout,\n classNames,\n theme = \"surface\",\n action: propAction,\n actionButton: propActionButton,\n paused,\n visible,\n closeIcon: propCloseIcon,\n closeButtonProps,\n closeButton = !!closeButtonProps,\n contentProps,\n disableToastContent,\n stacked,\n multiline,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"toast\");\n\n let actionButton = propActionButton;\n if (propAction) {\n let overrides: ButtonProps = {};\n let buttonChildren: ReactNode;\n // have to use `any` to correctly filter out all react elements\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isValidElement<any>(propAction) || typeof propAction !== \"object\") {\n buttonChildren = propAction;\n } else {\n ({ children: buttonChildren, ...overrides } = propAction);\n }\n\n actionButton = (\n <ToastActionButton\n theme={theme === \"surface\" ? \"secondary\" : \"clear\"}\n reordered={stacked && closeButton}\n {...overrides}\n >\n {buttonChildren}\n </ToastActionButton>\n );\n }\n\n let closeIcon = propCloseIcon;\n if (typeof closeButtonProps?.children !== \"undefined\") {\n closeIcon = closeButtonProps.children;\n }\n\n const action = !!actionButton;\n const reordered = stacked && action && closeButton;\n const { elementProps, rendered } = useScaleTransition({\n appear: true,\n nodeRef: ref,\n className: toast({\n className,\n theme,\n action,\n paused,\n stacked,\n reordered,\n closeButton,\n }),\n timeout,\n classNames,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n temporary: true,\n transitionIn: visible,\n exitedHidden: true,\n });\n\n // this might get rid of the weird popping-back-in for a split second\n // that sometimes happens on mobile firefox\n if (!rendered) {\n return null;\n }\n\n return (\n <div {...remaining} {...elementProps} id={id}>\n <ToastContent\n action={action}\n stacked={stacked}\n multiline={multiline}\n closeButton={closeButton}\n disableWrapper={disableToastContent}\n {...contentProps}\n >\n {children}\n </ToastContent>\n {actionButton}\n {closeButton && (\n <ToastCloseButton reordered={reordered} {...closeButtonProps}>\n {closeIcon}\n </ToastCloseButton>\n )}\n </div>\n );\n }\n);\n"],"names":["forwardRef","isValidElement","useScaleTransition","useEnsuredId","ToastActionButton","ToastCloseButton","ToastContent","toast","Toast","props","ref","id","propId","className","timeout","classNames","theme","action","propAction","actionButton","propActionButton","paused","visible","closeIcon","propCloseIcon","closeButtonProps","closeButton","contentProps","disableToastContent","stacked","multiline","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","remaining","overrides","buttonChildren","reordered","elementProps","rendered","appear","nodeRef","temporary","transitionIn","exitedHidden","div","disableWrapper"],"mappings":"AAAA;;AAEA,SAKEA,UAAU,EACVC,cAAc,QACT,QAAQ;AASf,SAASC,kBAAkB,QAAQ,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WAAWZ,UAAUS;IACvC,MAAM,EAAEgB,YAAY,EAAEC,QAAQ,EAAE,GAAGzC,mBAAmB;QACpD0C,QAAQ;QACRC,SAASnC;QACTG,WAAWN,MAAM;YACfM;YACAG;YACAC;YACAI;YACAQ;YACAY;YACAf;QACF;QACAZ;QACAC;QACAgB;QACAC;QACAC;QACAC;QACAC;QACAC;QACAU,WAAW;QACXC,cAAczB;QACd0B,cAAc;IAChB;IAEA,qEAAqE;IACrE,2CAA2C;IAC3C,IAAI,CAACL,UAAU;QACb,OAAO;IACT;IAEA,qBACE,MAACM;QAAK,GAAGX,SAAS;QAAG,GAAGI,YAAY;QAAE/B,IAAIA;;0BACxC,KAACL;gBACCW,QAAQA;gBACRY,SAASA;gBACTC,WAAWA;gBACXJ,aAAaA;gBACbwB,gBAAgBtB;gBACf,GAAGD,YAAY;0BAEfU;;YAEFlB;YACAO,6BACC,KAACrB;gBAAiBoC,WAAWA;gBAAY,GAAGhB,gBAAgB;0BACzDF;;;;AAKX,GACA"}
1
+ {"version":3,"sources":["../../src/snackbar/Toast.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type AriaRole,\n type HTMLAttributes,\n type ReactElement,\n type ReactNode,\n forwardRef,\n isValidElement,\n} from \"react\";\n\nimport { type ButtonProps } from \"../button/Button.js\";\nimport { type BackgroundColor } from \"../cssUtils.js\";\nimport {\n type CSSTransitionClassNames,\n type TransitionCallbacks,\n type TransitionTimeout,\n} from \"../transition/types.js\";\nimport { useScaleTransition } from \"../transition/useScaleTransition.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useEnsuredId } from \"../useEnsuredId.js\";\nimport { ToastActionButton } from \"./ToastActionButton.js\";\nimport { ToastCloseButton } from \"./ToastCloseButton.js\";\nimport { ToastContent, type ToastContentProps } from \"./ToastContent.js\";\nimport { toast } from \"./toastStyles.js\";\n\ndeclare module \"react\" {\n interface CSSProperties {\n \"--rmd-toast-color\"?: string;\n \"--rmd-toast-background-color\"?: string;\n \"--rmd-toast-offset\"?: string | number;\n }\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ConfigurableToastProps\n extends HTMLAttributes<HTMLDivElement>,\n TransitionCallbacks {\n /**\n * Note: this default value will only be generated in the `Toast` component.\n *\n * @defaultValue `\"toast-\" + useId()`\n */\n id?: string;\n\n /**\n * Note: This is set while creating the toast.\n *\n * @defaultValue `visibleTime === null ? \"alert\" : \"status\"`\n */\n role?: AriaRole;\n\n /**\n * @defaultValue `\"surface\"`\n */\n theme?: BackgroundColor;\n\n /**\n * Set this to `true` to stack the content above the {@link action}. It is not\n * recommended to enable this prop if the {@link closeButton} is enabled.\n *\n * @defaultValue `false`\n */\n stacked?: boolean;\n\n /**\n * If this is not provided, a `ResizeObserver` will be used to determine if\n * there are multiple lines of content.\n */\n multiline?: boolean;\n\n /**\n * When this is a string or React element, it will be rendered as the\n * `children` within a `Button`\n */\n action?: ButtonProps | ReactElement | string;\n\n /**\n * This can be used to replace the custom action button behavior.\n */\n actionButton?: ReactNode;\n\n /**\n * @defaultValue `getIcon(\"close\")`\n */\n closeIcon?: ReactNode;\n\n /**\n * Set this to `true` if a close button should be rendered to the right of the\n * `children`.\n *\n * @defaultValue `!!closeButtonProps`\n */\n closeButton?: boolean;\n\n /**\n * Use this prop to override most of the close button behavior. The\n */\n closeButtonProps?: ButtonProps;\n\n /**\n * Any additional props that should be provided to the `<div>` that surrounds\n * the toast `children`.\n */\n contentProps?: PropsWithRef<ToastContentProps>;\n\n /**\n * Set this to `true` if the `children` for the toast should no longer be\n * wrapped in an additional `<div>` that applies some toast layout styles.\n * This should normally only be used for custom `Toast` implementations.\n *\n * @see the `Snackbar`'s `renderToast` prop for an example.\n */\n disableToastContent?: boolean;\n\n /**\n * The toast's transition timeout for entering and exiting. This is **not**\n * how long the toast should remain visible.\n *\n * @defaultValue `SCALE_TIMEOUT`\n */\n timeout?: TransitionTimeout;\n\n /**\n * The toast's transition class names for entering and exiting.\n *\n * @defaultValue `SCALE_CLASSNAMES`\n */\n classNames?: CSSTransitionClassNames;\n}\n\n/**\n * @since 6.0.0\n */\nexport interface ToastProps extends ConfigurableToastProps {\n paused?: boolean;\n visible: boolean;\n}\n\n/**\n * **Client Component**\n *\n * This component is just used for toast styling and does not implement any of\n * the visibility behavior.\n *\n * @see {@link https://react-md.dev/components/snackbar | Snackbar Demos}\n * @since 6.0.0\n */\nexport const Toast = forwardRef<HTMLDivElement, ToastProps>(\n function Toast(props, ref) {\n const {\n id: propId,\n className,\n timeout,\n classNames,\n theme = \"surface\",\n action: propAction,\n actionButton: propActionButton,\n paused,\n visible,\n closeIcon: propCloseIcon,\n closeButtonProps,\n closeButton = !!closeButtonProps,\n contentProps,\n disableToastContent,\n stacked,\n multiline,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n children,\n ...remaining\n } = props;\n const id = useEnsuredId(propId, \"toast\");\n\n let actionButton = propActionButton;\n if (propAction) {\n let overrides: ButtonProps = {};\n let buttonChildren: ReactNode;\n // have to use `any` to correctly filter out all react elements\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isValidElement<any>(propAction) || typeof propAction !== \"object\") {\n buttonChildren = propAction;\n } else {\n ({ children: buttonChildren, ...overrides } = propAction);\n }\n\n actionButton = (\n <ToastActionButton\n theme={theme === \"surface\" ? \"secondary\" : \"clear\"}\n reordered={stacked && closeButton}\n {...overrides}\n >\n {buttonChildren}\n </ToastActionButton>\n );\n }\n\n let closeIcon = propCloseIcon;\n if (typeof closeButtonProps?.children !== \"undefined\") {\n closeIcon = closeButtonProps.children;\n }\n\n const action = !!actionButton;\n const reordered = stacked && action && closeButton;\n const { elementProps, rendered } = useScaleTransition({\n appear: true,\n nodeRef: ref,\n className: toast({\n className,\n theme,\n action,\n paused,\n stacked,\n reordered,\n closeButton,\n }),\n timeout,\n classNames,\n onEnter,\n onEntering,\n onEntered,\n onExit,\n onExiting,\n onExited,\n temporary: true,\n transitionIn: visible,\n exitedHidden: true,\n });\n\n // this might get rid of the weird popping-back-in for a split second\n // that sometimes happens on mobile firefox\n if (!rendered) {\n return null;\n }\n\n return (\n <div {...remaining} {...elementProps} id={id}>\n <ToastContent\n action={action}\n stacked={stacked}\n multiline={multiline}\n closeButton={closeButton}\n disableWrapper={disableToastContent}\n {...contentProps}\n >\n {children}\n </ToastContent>\n {actionButton}\n {closeButton && (\n <ToastCloseButton reordered={reordered} {...closeButtonProps}>\n {closeIcon}\n </ToastCloseButton>\n )}\n </div>\n );\n }\n);\n"],"names":["forwardRef","isValidElement","useScaleTransition","useEnsuredId","ToastActionButton","ToastCloseButton","ToastContent","toast","Toast","props","ref","id","propId","className","timeout","classNames","theme","action","propAction","actionButton","propActionButton","paused","visible","closeIcon","propCloseIcon","closeButtonProps","closeButton","contentProps","disableToastContent","stacked","multiline","onEnter","onEntering","onEntered","onExit","onExiting","onExited","children","remaining","overrides","buttonChildren","reordered","elementProps","rendered","appear","nodeRef","temporary","transitionIn","exitedHidden","div","disableWrapper"],"mappings":"AAAA;;AAEA,SAKEA,UAAU,EACVC,cAAc,QACT,QAAQ;AASf,SAASC,kBAAkB,QAAQ,sCAAsC;AAEzE,SAASC,YAAY,QAAQ,qBAAqB;AAClD,SAASC,iBAAiB,QAAQ,yBAAyB;AAC3D,SAASC,gBAAgB,QAAQ,wBAAwB;AACzD,SAASC,YAAY,QAAgC,oBAAoB;AACzE,SAASC,KAAK,QAAQ,mBAAmB;AAqHzC;;;;;;;;CAQC,GACD,OAAO,MAAMC,sBAAQR,WACnB,SAASQ,MAAMC,KAAK,EAAEC,GAAG;IACvB,MAAM,EACJC,IAAIC,MAAM,EACVC,SAAS,EACTC,OAAO,EACPC,UAAU,EACVC,QAAQ,SAAS,EACjBC,QAAQC,UAAU,EAClBC,cAAcC,gBAAgB,EAC9BC,MAAM,EACNC,OAAO,EACPC,WAAWC,aAAa,EACxBC,gBAAgB,EAChBC,cAAc,CAAC,CAACD,gBAAgB,EAChCE,YAAY,EACZC,mBAAmB,EACnBC,OAAO,EACPC,SAAS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ACC,KAACrB;gBAAiBoC,WAAWA;gBAAY,GAAGhB,gBAAgB;0BACzDF;;;;AAKX,GACA"}
@@ -4,6 +4,8 @@
4
4
 
5
5
  @use "sass:map";
6
6
  @use "../utils";
7
+ @use "../border-radius";
8
+ @use "../spacing";
7
9
  @use "../box-shadows";
8
10
  @use "../button/button";
9
11
  @use "../theme/a11y";
@@ -72,24 +74,24 @@ $default-align-items: center !default;
72
74
 
73
75
  /// The default `gap` for a `Snackbar`.
74
76
  /// @type Number
75
- $gap: 1rem !default;
77
+ $gap: spacing.get-var(md) !default;
76
78
 
77
79
  /// The default `gap` for a `Toast`.
78
80
  /// @type Number
79
- $toast-gap: 1rem !default;
81
+ $toast-gap: spacing.get-var(md) !default;
80
82
 
81
83
  /// The default `gap` for a stacked `Toast`.
82
84
  /// @type Number
83
- $toast-gap-stacked: 0.5rem !default;
85
+ $toast-gap-stacked: spacing.get-var(sm) !default;
84
86
 
85
87
  /// The default `gap` for a toast that has both a `ToastActionButton` and
86
88
  /// `ToastCloseButton`.
87
89
  /// @type Number
88
- $toast-gap-both-buttons: 0.25rem !default;
90
+ $toast-gap-both-buttons: spacing.get-var(xs) !default;
89
91
 
90
92
  /// The viewport margin to apply to all `Toast` rendered within the `Snackbar`.
91
93
  /// @type Number
92
- $margin: 1rem !default;
94
+ $margin: spacing.get-var(md) !default;
93
95
 
94
96
  /// A number between 0-24 representing the box-shadow elevation for a `Toast`.
95
97
  /// @type Number
@@ -97,25 +99,25 @@ $elevation: 6 !default;
97
99
 
98
100
  /// The default border-radius for a `Toast`.
99
101
  /// @type Number
100
- $border-radius: 0.25rem !default;
102
+ $border-radius: border-radius.get-var(xs) !default;
101
103
 
102
104
  /// The default vertical padding for a `Toast`.
103
105
  /// @type Number
104
- $vertical-padding: 0.75em !default;
106
+ $vertical-padding: calc(spacing.get-var(sm) * 1.5) !default;
105
107
 
106
108
  /// The default horizontal padding for a `Toast`.
107
109
  /// @type Number
108
- $horizontal-padding: 1rem !default;
110
+ $horizontal-padding: spacing.get-var(md) !default;
109
111
 
110
112
  /// The default horizontal padding for a `Toast` that has an
111
113
  /// `ToastActionButton`.
112
114
  /// @type Number
113
- $action-horizontal-padding: 0.5rem !default;
115
+ $action-horizontal-padding: spacing.get-var(sm) !default;
114
116
 
115
117
  /// The default horizontal padding for a `Toast` that has an
116
118
  /// `ToastCloseButton`.
117
119
  /// @type Number
118
- $close-button-horizontal-padding: 0 !default;
120
+ $close-button-horizontal-padding: spacing.get-var(none) !default;
119
121
 
120
122
  /// The min-height for a `Toast`.
121
123
  /// @type Number
@@ -89,7 +89,7 @@ export interface TableCellProps extends TableCellAttributes, TableCellOptions {
89
89
  *
90
90
  * @since 6.0.0
91
91
  */
92
- contentProps?: PropsWithRef<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
92
+ contentProps?: PropsWithRef<ButtonHTMLAttributes<HTMLButtonElement>>;
93
93
  /**
94
94
  * Any additional props to pass to the `IconRotator` when the `aria-sort` prop
95
95
  * has been provided.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableCell.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ButtonHTMLAttributes,\n type ReactNode,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n forwardRef,\n} from \"react\";\n\nimport { getIcon } from \"../icon/config.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport {\n TableCellContent,\n type TableCellContentsIconRotatorProps,\n} from \"./TableCellContent.js\";\nimport { useTableConfig } from \"./TableConfigurationProvider.js\";\nimport { tableCell } from \"./tableCellStyles.js\";\nimport { type SortOrder, type TableCellConfig } from \"./types.js\";\n\nexport type TableCellAttributes = Omit<\n | TdHTMLAttributes<HTMLTableCellElement>\n | ThHTMLAttributes<HTMLTableCellElement>,\n \"scope\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableCellOptions extends TableCellConfig {\n /**\n * This is a bit of a \"weird\" prop since all it does is apply `width: 100%` to\n * this cell. This will make this specific cell fill the remaining width of\n * the table (if there is any). If no cells have this prop enabled and the\n * `fullWidth` table configuration is enabled, all cells will have an\n * equal-sized width.\n *\n * @defaultValue `false`\n */\n grow?: boolean;\n\n /**\n * This prop is only valid when the `header` prop is enabled or the\n * `TableCell` is a child of the `TableHeader` component. This will generally\n * be used with a value of `\"row\"` if you have table headers that are at the\n * start of each row instead of at the top of the table.\n *\n * @defaultValue `\"col\"`\n */\n scope?: \"row\" | \"col\" | \"rowgroup\" | \"colgroup\";\n\n /**\n *\n * @defaultValue `false`\n * @since 6.0.0 This prop is only a boolean.\n */\n sticky?: boolean;\n\n /**\n * @internal\n * @defaultValue `false`\n */\n inputToggle?: boolean;\n}\n\n/**\n * @since 6.0.0 Removed the `colSpan=\"100%\"` support since `colSpan`\n * really only supports numbers.\n * @since 6.0.0 Removed `disablePadding` in favor of `padding`.\n */\nexport interface TableCellProps extends TableCellAttributes, TableCellOptions {\n /**\n * If you want to apply a sort icon for a header cell, set this prop to either\n * `\"ascending\"` or `\"descending\"`. When you change the sort order, this prop\n * should change as well which will cause the sort icon to rotate. The default\n * behavior is to have the icon facing upwards and not-rotated when\n * `\"ascending\"`, otherwise it will rotate downwards when `\"descending\"`.\n *\n * If this prop is set to `\"none\"`, the cell will render the clickable button\n * in the children, just without the sort icon. This is so that the sort\n * behavior can still be toggled for keyboard users and will be tab-focusable.\n *\n * @see {@link beforeChildren}\n * @see {@link afterChildren}\n */\n \"aria-sort\"?: SortOrder;\n\n /**\n * An optional sort icon to use. This will be defaulted to the configured sort\n * icon from the `@react-md/core` package. If you do not want the default\n * implementation for the sort icon behavior from `react-md`, you can set this\n * prop to `null`.\n */\n sortIcon?: ReactNode;\n\n /**\n * Boolean if the sort icon should appear after the children in the cell\n * instead of before.\n */\n sortIconAfter?: boolean;\n\n /**\n * Boolean if the sort icon should be rotated instead of the default\n * direction. When this is `undefined`, it will only be `true` when the\n * `\"aria-sort\"` prop is set to `\"descending\"`. If this is not `undefined`,\n * its boolean value will always be used.\n */\n sortIconRotated?: boolean;\n\n /**\n * @defaultValue `\"horizontal\"`\n */\n padding?: \"horizontal\" | \"vertical\" | \"none\";\n\n /**\n * This can be used to apply styling or any other props to the\n * `UnstyledButton` that surrounds the `children` when the `\"aria-sort\"` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<\n ButtonHTMLAttributes<HTMLButtonElement>,\n HTMLButtonElement\n >;\n\n /**\n * Any additional props to pass to the `IconRotator` when the `aria-sort` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n iconRotatorProps?: TableCellContentsIconRotatorProps;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @see {@link afterChildren} for an example.\n * @since 6.0.0\n */\n beforeChildren?: ReactNode;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @example\n * ```tsx\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { type SortOrder } from \"@react-md/core/table/types\";\n * import MoreVertIcon from \"@react-md/material-icons/MoreVertIcon\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * interface Props {\n * setSort(sort: string): void;\n * sortKey: string;\n * sortOrder: SortOrder;\n * }\n *\n * function Example({ sortKey, sortOrder, setSort }: Props): ReactElement {\n * const [visible, setVisible] = useState(false);\n *\n * return (\n * <>\n * <TableCell\n * aria-sort={sortKey === \"example\" ? sortOrder : \"none\"}\n * onClick={() => setSort(\"example\")}\n * afterChildren={\n * <Button\n * aria-label=\"Options\"\n * buttonType=\"icon\"\n * onClick={() => {\n * setVisible(true)\n * }}\n * >\n * <MoreVertIcon />\n * </Button>\n * }\n * >\n * Example content\n * </TableCell>\n * <Dialog\n * aria-label=\"Options\"\n * visible={visible}\n * onRequestClose={() => setVisible(false)}\n * >\n * Pretend Content...\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\n afterChildren?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<th>` or `<td>` cell with sensible styled defaults. You can create\n * a `<th>` element by enabling the `header` prop OR having a `TableCell` as a\n * child of the `TableHeader` component.\n *\n * Note: If you have a checkbox/radio column in the `TableHeader` without any\n * labels, you will need to manually set the `header={false}` prop for that cell\n * since it is invalid to have a `<th>` without any readable content for screen\n * readers.\n *\n * @see {@link https://react-md.dev/components/table | Table Demos}\n */\nexport const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(\n function TableCell(props, ref) {\n const {\n \"aria-sort\": sortOrder,\n className,\n grow = false,\n scope: propScope,\n hAlign: propHAlign,\n vAlign: propVAlign,\n header: propHeader,\n lineWrap: propDisableLineWrap,\n inputToggle,\n children,\n beforeChildren,\n afterChildren,\n sticky,\n sortIcon: propSortIcon,\n sortIconAfter = false,\n sortIconRotated,\n iconRotatorProps,\n padding = \"horizontal\",\n contentProps,\n ...remaining\n } = props;\n\n const sortIcon = getIcon(\"sort\", propSortIcon);\n\n // Note: unlike the other usages of `useTableConfig`, the `propHeader`\n // is not provided. This is so that `TableCheckbox` components can still\n // be a sticky header without being rendered as a `<th>`. This also makes\n // it so the scope can be defaulted to `col` or `row` automatically.\n const {\n header: inheritedHeader,\n hAlign,\n vAlign,\n lineWrap,\n } = useTableConfig({\n hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propDisableLineWrap,\n });\n const header = propHeader ?? inheritedHeader;\n\n let scope = propScope;\n if (!scope && header) {\n scope = !inheritedHeader && propHeader ? \"row\" : \"col\";\n }\n\n const Component = header ? \"th\" : \"td\";\n return (\n <Component\n {...remaining}\n ref={ref}\n aria-sort={sortOrder === \"none\" ? undefined : sortOrder}\n className={tableCell({\n className,\n grow,\n header,\n sticky,\n inputToggle,\n hAlign,\n vAlign,\n lineWrap: !sortOrder && lineWrap,\n padding: sortIcon && sortOrder ? \"none\" : padding,\n isInTableHeader: inheritedHeader,\n })}\n scope={scope}\n >\n {beforeChildren}\n <TableCellContent\n {...contentProps}\n icon={sortIcon}\n iconAfter={sortIconAfter}\n iconRotatorProps={iconRotatorProps}\n sortOrder={sortOrder}\n hAlign={hAlign}\n rotated={sortIconRotated}\n >\n {children}\n </TableCellContent>\n {afterChildren}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","getIcon","TableCellContent","useTableConfig","tableCell","TableCell","props","ref","sortOrder","className","grow","scope","propScope","hAlign","propHAlign","vAlign","propVAlign","header","propHeader","lineWrap","propDisableLineWrap","inputToggle","children","beforeChildren","afterChildren","sticky","sortIcon","propSortIcon","sortIconAfter","sortIconRotated","iconRotatorProps","padding","contentProps","remaining","inheritedHeader","Component","aria-sort","undefined","isInTableHeader","icon","iconAfter","rotated"],"mappings":"AAAA;;AAEA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,SAAS,QAAQ,uBAAuB;AA2LjD;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC,0BAAYL,WACvB,SAASK,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJ,aAAaC,SAAS,EACtBC,SAAS,EACTC,OAAO,KAAK,EACZC,OAAOC,SAAS,EAChBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,UAAUC,mBAAmB,EAC7BC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,MAAM,EACNC,UAAUC,YAAY,EACtBC,gBAAgB,KAAK,EACrBC,eAAe,EACfC,gBAAgB,EAChBC,UAAU,YAAY,EACtBC,YAAY,EACZ,GAAGC,WACJ,GAAG3B;IAEJ,MAAMoB,WAAWzB,QAAQ,QAAQ0B;IAEjC,sEAAsE;IACtE,wEAAwE;IACxE,yEAAyE;IACzE,oEAAoE;IACpE,MAAM,EACJV,QAAQiB,eAAe,EACvBrB,MAAM,EACNE,MAAM,EACNI,QAAQ,EACT,GAAGhB,eAAe;QACjBU,QAAQC;QACRC,QAAQC;QACRG,UAAUC;IACZ;IACA,MAAMH,SAASC,cAAcgB;IAE7B,IAAIvB,QAAQC;IACZ,IAAI,CAACD,SAASM,QAAQ;QACpBN,QAAQ,CAACuB,mBAAmBhB,aAAa,QAAQ;IACnD;IAEA,MAAMiB,YAAYlB,SAAS,OAAO;IAClC,qBACE,MAACkB;QACE,GAAGF,SAAS;QACb1B,KAAKA;QACL6B,aAAW5B,cAAc,SAAS6B,YAAY7B;QAC9CC,WAAWL,UAAU;YACnBK;YACAC;YACAO;YACAQ;YACAJ;YACAR;YACAE;YACAI,UAAU,CAACX,aAAaW;YACxBY,SAASL,YAAYlB,YAAY,SAASuB;YAC1CO,iBAAiBJ;QACnB;QACAvB,OAAOA;;YAENY;0BACD,KAACrB;gBACE,GAAG8B,YAAY;gBAChBO,MAAMb;gBACNc,WAAWZ;gBACXE,kBAAkBA;gBAClBtB,WAAWA;gBACXK,QAAQA;gBACR4B,SAASZ;0BAERP;;YAEFE;;;AAGP,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableCell.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type ButtonHTMLAttributes,\n type ReactNode,\n type TdHTMLAttributes,\n type ThHTMLAttributes,\n forwardRef,\n} from \"react\";\n\nimport { getIcon } from \"../icon/config.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport {\n TableCellContent,\n type TableCellContentsIconRotatorProps,\n} from \"./TableCellContent.js\";\nimport { useTableConfig } from \"./TableConfigurationProvider.js\";\nimport { tableCell } from \"./tableCellStyles.js\";\nimport { type SortOrder, type TableCellConfig } from \"./types.js\";\n\nexport type TableCellAttributes = Omit<\n | TdHTMLAttributes<HTMLTableCellElement>\n | ThHTMLAttributes<HTMLTableCellElement>,\n \"scope\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableCellOptions extends TableCellConfig {\n /**\n * This is a bit of a \"weird\" prop since all it does is apply `width: 100%` to\n * this cell. This will make this specific cell fill the remaining width of\n * the table (if there is any). If no cells have this prop enabled and the\n * `fullWidth` table configuration is enabled, all cells will have an\n * equal-sized width.\n *\n * @defaultValue `false`\n */\n grow?: boolean;\n\n /**\n * This prop is only valid when the `header` prop is enabled or the\n * `TableCell` is a child of the `TableHeader` component. This will generally\n * be used with a value of `\"row\"` if you have table headers that are at the\n * start of each row instead of at the top of the table.\n *\n * @defaultValue `\"col\"`\n */\n scope?: \"row\" | \"col\" | \"rowgroup\" | \"colgroup\";\n\n /**\n *\n * @defaultValue `false`\n * @since 6.0.0 This prop is only a boolean.\n */\n sticky?: boolean;\n\n /**\n * @internal\n * @defaultValue `false`\n */\n inputToggle?: boolean;\n}\n\n/**\n * @since 6.0.0 Removed the `colSpan=\"100%\"` support since `colSpan`\n * really only supports numbers.\n * @since 6.0.0 Removed `disablePadding` in favor of `padding`.\n */\nexport interface TableCellProps extends TableCellAttributes, TableCellOptions {\n /**\n * If you want to apply a sort icon for a header cell, set this prop to either\n * `\"ascending\"` or `\"descending\"`. When you change the sort order, this prop\n * should change as well which will cause the sort icon to rotate. The default\n * behavior is to have the icon facing upwards and not-rotated when\n * `\"ascending\"`, otherwise it will rotate downwards when `\"descending\"`.\n *\n * If this prop is set to `\"none\"`, the cell will render the clickable button\n * in the children, just without the sort icon. This is so that the sort\n * behavior can still be toggled for keyboard users and will be tab-focusable.\n *\n * @see {@link beforeChildren}\n * @see {@link afterChildren}\n */\n \"aria-sort\"?: SortOrder;\n\n /**\n * An optional sort icon to use. This will be defaulted to the configured sort\n * icon from the `@react-md/core` package. If you do not want the default\n * implementation for the sort icon behavior from `react-md`, you can set this\n * prop to `null`.\n */\n sortIcon?: ReactNode;\n\n /**\n * Boolean if the sort icon should appear after the children in the cell\n * instead of before.\n */\n sortIconAfter?: boolean;\n\n /**\n * Boolean if the sort icon should be rotated instead of the default\n * direction. When this is `undefined`, it will only be `true` when the\n * `\"aria-sort\"` prop is set to `\"descending\"`. If this is not `undefined`,\n * its boolean value will always be used.\n */\n sortIconRotated?: boolean;\n\n /**\n * @defaultValue `\"horizontal\"`\n */\n padding?: \"horizontal\" | \"vertical\" | \"none\";\n\n /**\n * This can be used to apply styling or any other props to the\n * `UnstyledButton` that surrounds the `children` when the `\"aria-sort\"` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n contentProps?: PropsWithRef<ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Any additional props to pass to the `IconRotator` when the `aria-sort` prop\n * has been provided.\n *\n * @since 6.0.0\n */\n iconRotatorProps?: TableCellContentsIconRotatorProps;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @see {@link afterChildren} for an example.\n * @since 6.0.0\n */\n beforeChildren?: ReactNode;\n\n /**\n * Since providing an `aria-sort` prop will wrap the `children` in an\n * `UnstyledButton`, you can use this prop to render another button within the\n * table cell before the main `children`.\n *\n * @example\n * ```tsx\n * import { Button } from \"@react-md/core/button/Button\";\n * import { Dialog } from \"@react-md/core/dialog/Dialog\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { type SortOrder } from \"@react-md/core/table/types\";\n * import MoreVertIcon from \"@react-md/material-icons/MoreVertIcon\";\n * import type { ReactElement } from \"react\";\n * import { useState } from \"react\";\n *\n * interface Props {\n * setSort(sort: string): void;\n * sortKey: string;\n * sortOrder: SortOrder;\n * }\n *\n * function Example({ sortKey, sortOrder, setSort }: Props): ReactElement {\n * const [visible, setVisible] = useState(false);\n *\n * return (\n * <>\n * <TableCell\n * aria-sort={sortKey === \"example\" ? sortOrder : \"none\"}\n * onClick={() => setSort(\"example\")}\n * afterChildren={\n * <Button\n * aria-label=\"Options\"\n * buttonType=\"icon\"\n * onClick={() => {\n * setVisible(true)\n * }}\n * >\n * <MoreVertIcon />\n * </Button>\n * }\n * >\n * Example content\n * </TableCell>\n * <Dialog\n * aria-label=\"Options\"\n * visible={visible}\n * onRequestClose={() => setVisible(false)}\n * >\n * Pretend Content...\n * </Dialog>\n * </>\n * );\n * }\n * ```\n *\n * @since 6.0.0\n */\n afterChildren?: ReactNode;\n}\n\n/**\n * **Client Component**\n *\n * Creates a `<th>` or `<td>` cell with sensible styled defaults. You can create\n * a `<th>` element by enabling the `header` prop OR having a `TableCell` as a\n * child of the `TableHeader` component.\n *\n * Note: If you have a checkbox/radio column in the `TableHeader` without any\n * labels, you will need to manually set the `header={false}` prop for that cell\n * since it is invalid to have a `<th>` without any readable content for screen\n * readers.\n *\n * @see {@link https://react-md.dev/components/table | Table Demos}\n */\nexport const TableCell = forwardRef<HTMLTableCellElement, TableCellProps>(\n function TableCell(props, ref) {\n const {\n \"aria-sort\": sortOrder,\n className,\n grow = false,\n scope: propScope,\n hAlign: propHAlign,\n vAlign: propVAlign,\n header: propHeader,\n lineWrap: propDisableLineWrap,\n inputToggle,\n children,\n beforeChildren,\n afterChildren,\n sticky,\n sortIcon: propSortIcon,\n sortIconAfter = false,\n sortIconRotated,\n iconRotatorProps,\n padding = \"horizontal\",\n contentProps,\n ...remaining\n } = props;\n\n const sortIcon = getIcon(\"sort\", propSortIcon);\n\n // Note: unlike the other usages of `useTableConfig`, the `propHeader`\n // is not provided. This is so that `TableCheckbox` components can still\n // be a sticky header without being rendered as a `<th>`. This also makes\n // it so the scope can be defaulted to `col` or `row` automatically.\n const {\n header: inheritedHeader,\n hAlign,\n vAlign,\n lineWrap,\n } = useTableConfig({\n hAlign: propHAlign,\n vAlign: propVAlign,\n lineWrap: propDisableLineWrap,\n });\n const header = propHeader ?? inheritedHeader;\n\n let scope = propScope;\n if (!scope && header) {\n scope = !inheritedHeader && propHeader ? \"row\" : \"col\";\n }\n\n const Component = header ? \"th\" : \"td\";\n return (\n <Component\n {...remaining}\n ref={ref}\n aria-sort={sortOrder === \"none\" ? undefined : sortOrder}\n className={tableCell({\n className,\n grow,\n header,\n sticky,\n inputToggle,\n hAlign,\n vAlign,\n lineWrap: !sortOrder && lineWrap,\n padding: sortIcon && sortOrder ? \"none\" : padding,\n isInTableHeader: inheritedHeader,\n })}\n scope={scope}\n >\n {beforeChildren}\n <TableCellContent\n {...contentProps}\n icon={sortIcon}\n iconAfter={sortIconAfter}\n iconRotatorProps={iconRotatorProps}\n sortOrder={sortOrder}\n hAlign={hAlign}\n rotated={sortIconRotated}\n >\n {children}\n </TableCellContent>\n {afterChildren}\n </Component>\n );\n }\n);\n"],"names":["forwardRef","getIcon","TableCellContent","useTableConfig","tableCell","TableCell","props","ref","sortOrder","className","grow","scope","propScope","hAlign","propHAlign","vAlign","propVAlign","header","propHeader","lineWrap","propDisableLineWrap","inputToggle","children","beforeChildren","afterChildren","sticky","sortIcon","propSortIcon","sortIconAfter","sortIconRotated","iconRotatorProps","padding","contentProps","remaining","inheritedHeader","Component","aria-sort","undefined","isInTableHeader","icon","iconAfter","rotated"],"mappings":"AAAA;;AAEA,SAKEA,UAAU,QACL,QAAQ;AAEf,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SACEC,gBAAgB,QAEX,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,kCAAkC;AACjE,SAASC,SAAS,QAAQ,uBAAuB;AAwLjD;;;;;;;;;;;;;CAaC,GACD,OAAO,MAAMC,0BAAYL,WACvB,SAASK,UAAUC,KAAK,EAAEC,GAAG;IAC3B,MAAM,EACJ,aAAaC,SAAS,EACtBC,SAAS,EACTC,OAAO,KAAK,EACZC,OAAOC,SAAS,EAChBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,QAAQC,UAAU,EAClBC,UAAUC,mBAAmB,EAC7BC,WAAW,EACXC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,MAAM,EACNC,UAAUC,YAAY,EACtBC,gBAAgB,KAAK,EACrBC,eAAe,EACfC,gBAAgB,EAChBC,UAAU,YAAY,EACtBC,YAAY,EACZ,GAAGC,WACJ,GAAG3B;IAEJ,MAAMoB,WAAWzB,QAAQ,QAAQ0B;IAEjC,sEAAsE;IACtE,wEAAwE;IACxE,yEAAyE;IACzE,oEAAoE;IACpE,MAAM,EACJV,QAAQiB,eAAe,EACvBrB,MAAM,EACNE,MAAM,EACNI,QAAQ,EACT,GAAGhB,eAAe;QACjBU,QAAQC;QACRC,QAAQC;QACRG,UAAUC;IACZ;IACA,MAAMH,SAASC,cAAcgB;IAE7B,IAAIvB,QAAQC;IACZ,IAAI,CAACD,SAASM,QAAQ;QACpBN,QAAQ,CAACuB,mBAAmBhB,aAAa,QAAQ;IACnD;IAEA,MAAMiB,YAAYlB,SAAS,OAAO;IAClC,qBACE,MAACkB;QACE,GAAGF,SAAS;QACb1B,KAAKA;QACL6B,aAAW5B,cAAc,SAAS6B,YAAY7B;QAC9CC,WAAWL,UAAU;YACnBK;YACAC;YACAO;YACAQ;YACAJ;YACAR;YACAE;YACAI,UAAU,CAACX,aAAaW;YACxBY,SAASL,YAAYlB,YAAY,SAASuB;YAC1CO,iBAAiBJ;QACnB;QACAvB,OAAOA;;YAENY;0BACD,KAACrB;gBACE,GAAG8B,YAAY;gBAChBO,MAAMb;gBACNc,WAAWZ;gBACXE,kBAAkBA;gBAClBtB,WAAWA;gBACXK,QAAQA;gBACR4B,SAASZ;0BAERP;;YAEFE;;;AAGP,GACA"}
@@ -39,7 +39,7 @@ export interface TableCheckboxProps extends TableCheckboxTdHTMLAttributes, Table
39
39
  * @see {@link TableCheckboxSupportedCheckboxProps}
40
40
  * @since 6.0.0
41
41
  */
42
- checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;
42
+ checkboxProps?: PropsWithRef<CheckboxProps>;
43
43
  }
44
44
  /**
45
45
  * **Client Component**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TdHTMLAttributes, forwardRef } from \"react\";\n\nimport { Checkbox } from \"../form/Checkbox.js\";\nimport { type CheckboxProps } from \"../form/InputToggle.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type TableCheckboxTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableCheckboxSupportedCheckboxProps = Pick<\n CheckboxProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"indeterminateIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"indeterminate\"\n | \"aria-controls\"\n>;\n\n/**\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6.0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport interface TableCheckboxProps\n extends TableCheckboxTdHTMLAttributes,\n TableCheckboxSupportedCheckboxProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the checkbox that are not\n * configurable as top-level props.\n *\n * @example Simple Example\n * ```tsx\n * checkboxProps={{\n * id: \"some-custom-id\",\n * ref: checkboxRef,\n * }}\n * ```\n *\n * @see {@link TableCheckboxSupportedCheckboxProps}\n * @since 6.0.0\n */\n checkboxProps?: PropsWithRef<CheckboxProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example Simple Example\n * ```tsx\n * import { useCheckboxGroup } from \"@react-md/core/form/useCheckboxGroup\";\n * import { Table } from \"@react-md/core/table/Table\";\n * import { TableBody } from \"@react-md/core/table/TableBody\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { TableCheckbox } from \"@react-md/core/table/TableCheckbox\";\n * import { TableContainer } from \"@react-md/core/table/TableContainer\";\n * import { TableHeader } from \"@react-md/core/table/TableHeader\";\n * import { TableRow } from \"@react-md/core/table/TableRow\";\n * import { type ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getCheckboxProps, getIndeterminateProps } = useCheckboxGroup({\n * values: rows.map(({ name }) => name),\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCheckbox {...getIndeterminateProps()} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const checkboxProps = getCheckboxProps(name);\n * const { checked, onChange } = checkboxProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableCheckbox {...checkboxProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/table | Table Demos}\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6.0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport const TableCheckbox = forwardRef<\n HTMLTableCellElement,\n TableCheckboxProps\n>(function TableCheckbox(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminateIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n indeterminate,\n checkboxProps,\n onClick = noop,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Checkbox\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n indeterminateIcon={indeterminateIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChange}\n indeterminate={indeterminate}\n {...checkboxProps}\n />\n </TableCell>\n );\n});\n"],"names":["forwardRef","Checkbox","TableCell","noop","TableCheckbox","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","indeterminateIcon","value","checked","onChange","defaultChecked","indeterminate","checkboxProps","onClick","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AAEA,SAAgCA,UAAU,QAAQ,QAAQ;AAE1D,SAASC,QAAQ,QAAQ,sBAAsB;AAG/C,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEC,GACD,OAAO,MAAMC,8BAAgBJ,WAG3B,SAASI,cAAcC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,iBAAiB,EACjBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,UAAUrB,IAAI,EACd,GAAGsB,WACJ,GAAGpB;IAEJ,qBACE,KAACH;QACE,GAAGuB,SAAS;QACbnB,KAAKA;QACLoB,QAAQ;QACRC,WAAW;QACXH,SAAS,CAACI;YACRA,MAAMC,eAAe;YACrBL,QAAQI;QACV;kBAEA,cAAA,KAAC3B;YACC6B,cAAYtB;YACZuB,mBAAiBxB;YACjByB,iBAAetB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,mBAAmBA;YACnBC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBD,UAAUA;YACVE,eAAeA;YACd,GAAGC,aAAa;;;AAIzB,GAAG"}
1
+ {"version":3,"sources":["../../src/table/TableCheckbox.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TdHTMLAttributes, forwardRef } from \"react\";\n\nimport { Checkbox } from \"../form/Checkbox.js\";\nimport { type CheckboxProps } from \"../form/InputToggle.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type TableCheckboxTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableCheckboxSupportedCheckboxProps = Pick<\n CheckboxProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"indeterminateIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"indeterminate\"\n | \"aria-controls\"\n>;\n\n/**\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6.0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport interface TableCheckboxProps\n extends TableCheckboxTdHTMLAttributes,\n TableCheckboxSupportedCheckboxProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the checkbox that are not\n * configurable as top-level props.\n *\n * @example Simple Example\n * ```tsx\n * checkboxProps={{\n * id: \"some-custom-id\",\n * ref: checkboxRef,\n * }}\n * ```\n *\n * @see {@link TableCheckboxSupportedCheckboxProps}\n * @since 6.0.0\n */\n checkboxProps?: PropsWithRef<CheckboxProps>;\n}\n\n/**\n * **Client Component**\n * The `TableCheckbox` is used to render a `Checkbox` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example Simple Example\n * ```tsx\n * import { useCheckboxGroup } from \"@react-md/core/form/useCheckboxGroup\";\n * import { Table } from \"@react-md/core/table/Table\";\n * import { TableBody } from \"@react-md/core/table/TableBody\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { TableCheckbox } from \"@react-md/core/table/TableCheckbox\";\n * import { TableContainer } from \"@react-md/core/table/TableContainer\";\n * import { TableHeader } from \"@react-md/core/table/TableHeader\";\n * import { TableRow } from \"@react-md/core/table/TableRow\";\n * import { type ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getCheckboxProps, getIndeterminateProps } = useCheckboxGroup({\n * values: rows.map(({ name }) => name),\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCheckbox {...getIndeterminateProps()} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const checkboxProps = getCheckboxProps(name);\n * const { checked, onChange } = checkboxProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableCheckbox {...checkboxProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/table | Table Demos}\n * @since 6.0.0 The `id` prop is no longer required since the checkbox's id\n * will automatically be generated as `\"checkbox\" + useId()`. Use the {@link checkboxProps}\n * to set an `id` manually for the checkbox.\n * @since 6.0.0 The `cellId` prop was removed. Use the `id` prop instead.\n * @since 6.0.0 The default `aria-label` was changed from\n * `\"Toggle Row Selection\"` to `\"Select Row\"`.\n */\nexport const TableCheckbox = forwardRef<\n HTMLTableCellElement,\n TableCheckboxProps\n>(function TableCheckbox(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n indeterminateIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n indeterminate,\n checkboxProps,\n onClick = noop,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Checkbox\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n indeterminateIcon={indeterminateIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n onChange={onChange}\n indeterminate={indeterminate}\n {...checkboxProps}\n />\n </TableCell>\n );\n});\n"],"names":["forwardRef","Checkbox","TableCell","noop","TableCheckbox","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","indeterminateIcon","value","checked","onChange","defaultChecked","indeterminate","checkboxProps","onClick","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AAEA,SAAgCA,UAAU,QAAQ,QAAQ;AAE1D,SAASC,QAAQ,QAAQ,sBAAsB;AAG/C,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuEC,GACD,OAAO,MAAMC,8BAAgBJ,WAG3B,SAASI,cAAcC,KAAK,EAAEC,GAAG;IACjC,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,iBAAiB,EACjBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,aAAa,EACbC,UAAUrB,IAAI,EACd,GAAGsB,WACJ,GAAGpB;IAEJ,qBACE,KAACH;QACE,GAAGuB,SAAS;QACbnB,KAAKA;QACLoB,QAAQ;QACRC,WAAW;QACXH,SAAS,CAACI;YACRA,MAAMC,eAAe;YACrBL,QAAQI;QACV;kBAEA,cAAA,KAAC3B;YACC6B,cAAYtB;YACZuB,mBAAiBxB;YACjByB,iBAAetB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,mBAAmBA;YACnBC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBD,UAAUA;YACVE,eAAeA;YACd,GAAGC,aAAa;;;AAIzB,GAAG"}
@@ -34,7 +34,7 @@ export interface TableRadioProps extends TableRadioTdHTMLAttributes, TableRadioS
34
34
  * @see {@link TableRadioSupportedRadioProps}
35
35
  * @since 6.0.0
36
36
  */
37
- radioProps?: PropsWithRef<RadioProps, HTMLInputElement>;
37
+ radioProps?: PropsWithRef<RadioProps>;
38
38
  }
39
39
  /**
40
40
  * **Client Component**
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/table/TableRadio.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TdHTMLAttributes, forwardRef } from \"react\";\n\nimport { type RadioProps } from \"../form/InputToggle.js\";\nimport { Radio } from \"../form/Radio.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\" | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioSupportedRadioProps = Pick<\n RadioProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"error\"\n | \"required\"\n | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableRadioProps\n extends TableRadioTdHTMLAttributes,\n TableRadioSupportedRadioProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the radio that are not\n * configurable as top-level props.\n *\n * @example Simple Example\n * ```tsx\n * radioProps={{\n * id: \"some-custom-id\",\n * ref: radioRef,\n * }}\n * ```\n *\n * @see {@link TableRadioSupportedRadioProps}\n * @since 6.0.0\n */\n radioProps?: PropsWithRef<RadioProps, HTMLInputElement>;\n}\n\n/**\n * **Client Component**\n * The `TableRadio` is used to render a `Radio` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example Simple Example\n * ```tsx\n * import { useRadioGroup } from \"@react-md/core/form/useRadioGroup\";\n * import { Table } from \"@react-md/core/table/Table\";\n * import { TableBody } from \"@react-md/core/table/TableBody\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { TableContainer } from \"@react-md/core/table/TableContainer\";\n * import { TableHeader } from \"@react-md/core/table/TableHeader\";\n * import { TableRadio } from \"@react-md/core/table/TableRadio\";\n * import { TableRow } from \"@react-md/core/table/TableRow\";\n * import type { ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getRadioProps } = useRadioGroup({\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCell header={false} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const radioProps = getRadioProps(name);\n * const { checked, onChange } = radioProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableRadio {...radioProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/table | Table Demos}\n * @since 6.0.0\n */\nexport const TableRadio = forwardRef<HTMLTableCellElement, TableRadioProps>(\n function TableRadio(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n radioProps,\n onClick = noop,\n error,\n required,\n onInvalid,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Radio\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n error={error}\n required={required}\n onChange={onChange}\n onInvalid={onInvalid}\n {...radioProps}\n />\n </TableCell>\n );\n }\n);\n"],"names":["forwardRef","Radio","TableCell","noop","TableRadio","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","value","checked","onChange","defaultChecked","radioProps","onClick","error","required","onInvalid","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AAEA,SAAgCA,UAAU,QAAQ,QAAQ;AAG1D,SAASC,KAAK,QAAQ,mBAAmB;AAEzC,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEC,GACD,OAAO,MAAMC,2BAAaJ,WACxB,SAASI,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,UAAU,EACVC,UAAUnB,IAAI,EACdoB,KAAK,EACLC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGrB;IAEJ,qBACE,KAACH;QACE,GAAGwB,SAAS;QACbpB,KAAKA;QACLqB,QAAQ;QACRC,WAAW;QACXN,SAAS,CAACO;YACRA,MAAMC,eAAe;YACrBR,QAAQO;QACV;kBAEA,cAAA,KAAC5B;YACC8B,cAAYvB;YACZwB,mBAAiBzB;YACjB0B,iBAAevB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBG,OAAOA;YACPC,UAAUA;YACVL,UAAUA;YACVM,WAAWA;YACV,GAAGJ,UAAU;;;AAItB,GACA"}
1
+ {"version":3,"sources":["../../src/table/TableRadio.tsx"],"sourcesContent":["\"use client\";\n\nimport { type TdHTMLAttributes, forwardRef } from \"react\";\n\nimport { type RadioProps } from \"../form/InputToggle.js\";\nimport { Radio } from \"../form/Radio.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { TableCell } from \"./TableCell.js\";\n\nconst noop = (): void => {\n // do nothing\n};\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioTdHTMLAttributes = Omit<\n TdHTMLAttributes<HTMLTableCellElement>,\n \"aria-sort\" | \"scope\" | \"onChange\" | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport type TableRadioSupportedRadioProps = Pick<\n RadioProps,\n | \"name\"\n | \"value\"\n | \"icon\"\n | \"iconStyle\"\n | \"iconClassName\"\n | \"iconProps\"\n | \"checkedIcon\"\n | \"checked\"\n | \"onChange\"\n | \"defaultChecked\"\n | \"error\"\n | \"required\"\n | \"onInvalid\"\n>;\n\n/**\n * @since 6.0.0\n */\nexport interface TableRadioProps\n extends TableRadioTdHTMLAttributes,\n TableRadioSupportedRadioProps {\n /**\n * @defaultValue `!props[\"aria-labelledby\"] ? \"Select Row\" : undefined`\n */\n \"aria-label\"?: string;\n\n /** @defaultValue `false` */\n sticky?: boolean;\n\n /**\n * This allows you to override any props for the radio that are not\n * configurable as top-level props.\n *\n * @example Simple Example\n * ```tsx\n * radioProps={{\n * id: \"some-custom-id\",\n * ref: radioRef,\n * }}\n * ```\n *\n * @see {@link TableRadioSupportedRadioProps}\n * @since 6.0.0\n */\n radioProps?: PropsWithRef<RadioProps>;\n}\n\n/**\n * **Client Component**\n * The `TableRadio` is used to render a `Radio` within a `TableCell` by applying\n * some minimal styles.\n *\n * @example Simple Example\n * ```tsx\n * import { useRadioGroup } from \"@react-md/core/form/useRadioGroup\";\n * import { Table } from \"@react-md/core/table/Table\";\n * import { TableBody } from \"@react-md/core/table/TableBody\";\n * import { TableCell } from \"@react-md/core/table/TableCell\";\n * import { TableContainer } from \"@react-md/core/table/TableContainer\";\n * import { TableHeader } from \"@react-md/core/table/TableHeader\";\n * import { TableRadio } from \"@react-md/core/table/TableRadio\";\n * import { TableRow } from \"@react-md/core/table/TableRow\";\n * import type { ReactElement } from \"react\";\n *\n * const rows = [\n * { name: \"Frozen Yogurt\", type: \"Ice Cream\" },\n * { name: \"Ice cream sandwich\", type: \"Ice Cream\" },\n * { name: \"Eclair\", type: \"Pastry\" },\n * // ...other content\n * ] as const;\n *\n * function Example(): ReactElement {\n * const { getRadioProps } = useRadioGroup({\n * name: \"selected\",\n * });\n * return (\n * <TableContainer>\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableCell header={false} />\n * <TableCell>Name</TableCell>\n * <TableCell>Type</TableCell>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * {rows.map(({ name, type }) => {\n * const radioProps = getRadioProps(name);\n * const { checked, onChange } = radioProps;\n *\n * return (\n * <TableRow\n * key={name}\n * onClick={onChange}\n * clickable\n * selected={checked}\n * >\n * <TableRadio {...radioProps} />\n * <TableCell>{name}</TableCell>\n * <TableCell hAlign=\"right\">{type}</TableCell>\n * </TableRow>\n * );\n * })}\n * </TableBody>\n * </Table>\n * </TableContainer>\n * );\n * }\n * ```\n *\n * @see {@link https://react-md.dev/components/table | Table Demos}\n * @since 6.0.0\n */\nexport const TableRadio = forwardRef<HTMLTableCellElement, TableRadioProps>(\n function TableRadio(props, ref) {\n const {\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel = !ariaLabelledBy ? \"Select Row\" : undefined,\n \"aria-controls\": ariaControls,\n name,\n icon,\n iconProps,\n iconStyle,\n iconClassName,\n checkedIcon,\n value,\n checked,\n onChange,\n defaultChecked,\n radioProps,\n onClick = noop,\n error,\n required,\n onInvalid,\n ...remaining\n } = props;\n\n return (\n <TableCell\n {...remaining}\n ref={ref}\n header={false}\n inputToggle\n onClick={(event) => {\n event.stopPropagation();\n onClick(event);\n }}\n >\n <Radio\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-controls={ariaControls}\n name={name}\n icon={icon}\n iconProps={iconProps}\n iconStyle={iconStyle}\n iconClassName={iconClassName}\n checkedIcon={checkedIcon}\n value={value}\n checked={checked}\n defaultChecked={defaultChecked}\n error={error}\n required={required}\n onChange={onChange}\n onInvalid={onInvalid}\n {...radioProps}\n />\n </TableCell>\n );\n }\n);\n"],"names":["forwardRef","Radio","TableCell","noop","TableRadio","props","ref","ariaLabelledBy","ariaLabel","undefined","ariaControls","name","icon","iconProps","iconStyle","iconClassName","checkedIcon","value","checked","onChange","defaultChecked","radioProps","onClick","error","required","onInvalid","remaining","header","inputToggle","event","stopPropagation","aria-label","aria-labelledby","aria-controls"],"mappings":"AAAA;;AAEA,SAAgCA,UAAU,QAAQ,QAAQ;AAG1D,SAASC,KAAK,QAAQ,mBAAmB;AAEzC,SAASC,SAAS,QAAQ,iBAAiB;AAE3C,MAAMC,OAAO;AACX,aAAa;AACf;AA8DA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiEC,GACD,OAAO,MAAMC,2BAAaJ,WACxB,SAASI,WAAWC,KAAK,EAAEC,GAAG;IAC5B,MAAM,EACJ,mBAAmBC,cAAc,EACjC,cAAcC,YAAY,CAACD,iBAAiB,eAAeE,SAAS,EACpE,iBAAiBC,YAAY,EAC7BC,IAAI,EACJC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,cAAc,EACdC,UAAU,EACVC,UAAUnB,IAAI,EACdoB,KAAK,EACLC,QAAQ,EACRC,SAAS,EACT,GAAGC,WACJ,GAAGrB;IAEJ,qBACE,KAACH;QACE,GAAGwB,SAAS;QACbpB,KAAKA;QACLqB,QAAQ;QACRC,WAAW;QACXN,SAAS,CAACO;YACRA,MAAMC,eAAe;YACrBR,QAAQO;QACV;kBAEA,cAAA,KAAC5B;YACC8B,cAAYvB;YACZwB,mBAAiBzB;YACjB0B,iBAAevB;YACfC,MAAMA;YACNC,MAAMA;YACNC,WAAWA;YACXC,WAAWA;YACXC,eAAeA;YACfC,aAAaA;YACbC,OAAOA;YACPC,SAASA;YACTE,gBAAgBA;YAChBG,OAAOA;YACPC,UAAUA;YACVL,UAAUA;YACVM,WAAWA;YACV,GAAGJ,UAAU;;;AAItB,GACA"}
@@ -4,6 +4,7 @@
4
4
 
5
5
  @use "sass:map";
6
6
  @use "../utils";
7
+ @use "../spacing";
7
8
  @use "../box-shadows";
8
9
  @use "../theme/theme";
9
10
  @use "../icon/icon";
@@ -184,20 +185,20 @@ $cell-header-dense-height: 2.125rem !default;
184
185
 
185
186
  /// The default `TableCell` horizontal padding.
186
187
  /// @type Number
187
- $cell-horizontal-padding: 1rem !default;
188
+ $cell-horizontal-padding: spacing.get-var(md) !default;
188
189
 
189
190
  /// The default `TableCell` vertical padding.
190
191
  /// @type Number
191
- $cell-vertical-padding: 0.375rem !default;
192
+ $cell-vertical-padding: calc(spacing.get-var(xs) * 1.5) !default;
192
193
 
193
194
  /// The default `TableCheckbox` and `TableRadio` horizontal padding.
194
195
  /// @type Number
195
196
  ///
196
- $cell-input-toggle-horizontal-padding: 0.5rem !default;
197
+ $cell-input-toggle-horizontal-padding: spacing.get-var(sm) !default;
197
198
 
198
199
  /// The default `gap` between items in a sortable `TableCell`.
199
200
  /// @type Number
200
- $cell-content-gap: icon.$spacing !default;
201
+ $cell-content-gap: spacing.get-var(sm) !default;
201
202
 
202
203
  /// This is the default position of a row based sticky `TableCell`.
203
204
  /// @type Number
@@ -8,7 +8,7 @@ import { type GetTabListScrollToOptions } from "./getTabListScrollToOptions.js";
8
8
  * @since 6.0.0
9
9
  */
10
10
  export interface BaseTabListScrollButtonProps extends HTMLAttributes<HTMLDivElement>, ButtonClassNameThemeOptions {
11
- buttonProps?: PropsWithRef<ButtonProps, HTMLButtonElement>;
11
+ buttonProps?: PropsWithRef<ButtonProps>;
12
12
  /** @defaultValue `false` */
13
13
  disableTransition?: boolean;
14
14
  /** @defaultValue {@link getTabListScrollToOptions} */
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/tabs/TabListScrollButton.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type HTMLAttributes,\n forwardRef,\n useCallback,\n useRef,\n useState,\n} from \"react\";\n\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { type ButtonClassNameThemeOptions } from \"../button/styles.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useDir } from \"../typography/WritingDirectionProvider.js\";\nimport { useIntersectionObserver } from \"../useIntersectionObserver.js\";\nimport { applyRef } from \"../utils/applyRef.js\";\nimport {\n type GetTabListScrollToOptions,\n getTabListScrollToOptions,\n} from \"./getTabListScrollToOptions.js\";\nimport {\n tabListScrollButton,\n tabListScrollButtonContainer,\n} from \"./tabListScrollButtonStyles.js\";\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface BaseTabListScrollButtonProps\n extends HTMLAttributes<HTMLDivElement>,\n ButtonClassNameThemeOptions {\n buttonProps?: PropsWithRef<ButtonProps, HTMLButtonElement>;\n\n /** @defaultValue `false` */\n disableTransition?: boolean;\n\n /** @defaultValue {@link getTabListScrollToOptions} */\n getScrollToOptions?: GetTabListScrollToOptions;\n}\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface TabListScrollButtonProps extends BaseTabListScrollButtonProps {\n type: \"back\" | \"forward\";\n /** @defaultValue `false` */\n vertical?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * @internal\n * @since 6.0.0\n */\nexport const TabListScrollButton = forwardRef<\n HTMLDivElement,\n TabListScrollButtonProps\n>(function TabListScrollButton(props, ref) {\n const {\n \"aria-label\": ariaLabel,\n className,\n buttonProps,\n type,\n theme,\n themeType,\n buttonType = \"icon\",\n disabled: propDisabled,\n children: propChildren,\n getScrollToOptions = getTabListScrollToOptions,\n vertical = false,\n disableTransition = false,\n ...remaining\n } = props;\n\n const forward = type === \"forward\";\n const iconButton = buttonType === \"icon\";\n const icon = getIcon(type);\n const children = propChildren || icon;\n\n const root = useRef<HTMLElement | null>(null);\n const isRTL = useDir().dir === \"rtl\";\n const [disabled, setDisabled] = useState(!forward);\n const nodeRef = useIntersectionObserver({\n root,\n rootMargin: \"1px\",\n onUpdate: useCallback(([entry]) => {\n setDisabled(entry.intersectionRatio === 1);\n }, []),\n });\n\n return (\n <>\n {!forward && <span ref={nodeRef} />}\n <div\n {...remaining}\n ref={(instance) => {\n applyRef(instance, ref);\n root.current = instance?.parentElement || null;\n }}\n className={tabListScrollButtonContainer({\n forward,\n vertical,\n className,\n })}\n >\n <Button\n aria-label={ariaLabel || (iconButton ? type : undefined)}\n theme={theme}\n themeType={themeType}\n buttonType={buttonType}\n disabled={propDisabled || disabled}\n {...buttonProps}\n className={tabListScrollButton({\n className: buttonProps?.className,\n vertical,\n })}\n onClick={(event) => {\n buttonProps?.onClick?.(event);\n const container = root.current;\n if (!container) {\n return;\n }\n\n container.scrollTo(\n getScrollToOptions({\n isRTL,\n animate: !disableTransition,\n vertical,\n container,\n increment: forward,\n })\n );\n }}\n >\n {children}\n </Button>\n </div>\n {forward && <span ref={nodeRef} />}\n </>\n );\n});\n"],"names":["forwardRef","useCallback","useRef","useState","Button","getIcon","useDir","useIntersectionObserver","applyRef","getTabListScrollToOptions","tabListScrollButton","tabListScrollButtonContainer","TabListScrollButton","props","ref","ariaLabel","className","buttonProps","type","theme","themeType","buttonType","disabled","propDisabled","children","propChildren","getScrollToOptions","vertical","disableTransition","remaining","forward","iconButton","icon","root","isRTL","dir","setDisabled","nodeRef","rootMargin","onUpdate","entry","intersectionRatio","span","div","instance","current","parentElement","aria-label","undefined","onClick","event","container","scrollTo","animate","increment"],"mappings":"AAAA;;AAEA,SAEEA,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,QAAQ,QACH,QAAQ;AAEf,SAASC,MAAM,QAA0B,sBAAsB;AAE/D,SAASC,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,MAAM,QAAQ,4CAA4C;AACnE,SAASC,uBAAuB,QAAQ,gCAAgC;AACxE,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAEEC,yBAAyB,QACpB,iCAAiC;AACxC,SACEC,mBAAmB,EACnBC,4BAA4B,QACvB,iCAAiC;AA4BxC;;;;;CAKC,GACD,OAAO,MAAMC,oCAAsBZ,WAGjC,SAASY,oBAAoBC,KAAK,EAAEC,GAAG;IACvC,MAAM,EACJ,cAAcC,SAAS,EACvBC,SAAS,EACTC,WAAW,EACXC,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AAS,CAACzB;4BACVD;4BACAwB;4BACAG,WAAWxB;wBACb;oBAEJ;8BAECN;;;YAGJM,yBAAW,KAACY;gBAAK5B,KAAKuB;;;;AAG7B,GAAG"}
1
+ {"version":3,"sources":["../../src/tabs/TabListScrollButton.tsx"],"sourcesContent":["\"use client\";\n\nimport {\n type HTMLAttributes,\n forwardRef,\n useCallback,\n useRef,\n useState,\n} from \"react\";\n\nimport { Button, type ButtonProps } from \"../button/Button.js\";\nimport { type ButtonClassNameThemeOptions } from \"../button/styles.js\";\nimport { getIcon } from \"../icon/config.js\";\nimport { type PropsWithRef } from \"../types.js\";\nimport { useDir } from \"../typography/WritingDirectionProvider.js\";\nimport { useIntersectionObserver } from \"../useIntersectionObserver.js\";\nimport { applyRef } from \"../utils/applyRef.js\";\nimport {\n type GetTabListScrollToOptions,\n getTabListScrollToOptions,\n} from \"./getTabListScrollToOptions.js\";\nimport {\n tabListScrollButton,\n tabListScrollButtonContainer,\n} from \"./tabListScrollButtonStyles.js\";\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface BaseTabListScrollButtonProps\n extends HTMLAttributes<HTMLDivElement>,\n ButtonClassNameThemeOptions {\n buttonProps?: PropsWithRef<ButtonProps>;\n\n /** @defaultValue `false` */\n disableTransition?: boolean;\n\n /** @defaultValue {@link getTabListScrollToOptions} */\n getScrollToOptions?: GetTabListScrollToOptions;\n}\n\n/**\n * @internal\n * @since 6.0.0\n */\nexport interface TabListScrollButtonProps extends BaseTabListScrollButtonProps {\n type: \"back\" | \"forward\";\n /** @defaultValue `false` */\n vertical?: boolean;\n}\n\n/**\n * **Client Component**\n *\n * @internal\n * @since 6.0.0\n */\nexport const TabListScrollButton = forwardRef<\n HTMLDivElement,\n TabListScrollButtonProps\n>(function TabListScrollButton(props, ref) {\n const {\n \"aria-label\": ariaLabel,\n className,\n buttonProps,\n type,\n theme,\n themeType,\n buttonType = \"icon\",\n disabled: propDisabled,\n children: propChildren,\n getScrollToOptions = getTabListScrollToOptions,\n vertical = false,\n disableTransition = false,\n ...remaining\n } = props;\n\n const forward = type === \"forward\";\n const iconButton = buttonType === \"icon\";\n const icon = getIcon(type);\n const children = propChildren || icon;\n\n const root = useRef<HTMLElement | null>(null);\n const isRTL = useDir().dir === \"rtl\";\n const [disabled, setDisabled] = useState(!forward);\n const nodeRef = useIntersectionObserver({\n root,\n rootMargin: \"1px\",\n onUpdate: useCallback(([entry]) => {\n setDisabled(entry.intersectionRatio === 1);\n }, []),\n });\n\n return (\n <>\n {!forward && <span ref={nodeRef} />}\n <div\n {...remaining}\n ref={(instance) => {\n applyRef(instance, ref);\n root.current = instance?.parentElement || null;\n }}\n className={tabListScrollButtonContainer({\n forward,\n vertical,\n className,\n })}\n >\n <Button\n aria-label={ariaLabel || (iconButton ? type : undefined)}\n theme={theme}\n themeType={themeType}\n buttonType={buttonType}\n disabled={propDisabled || disabled}\n {...buttonProps}\n className={tabListScrollButton({\n className: buttonProps?.className,\n vertical,\n })}\n onClick={(event) => {\n buttonProps?.onClick?.(event);\n const container = root.current;\n if (!container) {\n return;\n }\n\n container.scrollTo(\n getScrollToOptions({\n isRTL,\n animate: !disableTransition,\n vertical,\n container,\n increment: forward,\n })\n );\n }}\n >\n {children}\n </Button>\n </div>\n {forward && <span ref={nodeRef} />}\n </>\n );\n});\n"],"names":["forwardRef","useCallback","useRef","useState","Button","getIcon","useDir","useIntersectionObserver","applyRef","getTabListScrollToOptions","tabListScrollButton","tabListScrollButtonContainer","TabListScrollButton","props","ref","ariaLabel","className","buttonProps","type","theme","themeType","buttonType","disabled","propDisabled","children","propChildren","getScrollToOptions","vertical","disableTransition","remaining","forward","iconButton","icon","root","isRTL","dir","setDisabled","nodeRef","rootMargin","onUpdate","entry","intersectionRatio","span","div","instance","current","parentElement","aria-label","undefined","onClick","event","container","scrollTo","animate","increment"],"mappings":"AAAA;;AAEA,SAEEA,UAAU,EACVC,WAAW,EACXC,MAAM,EACNC,QAAQ,QACH,QAAQ;AAEf,SAASC,MAAM,QAA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A,KAACZ;oBACC2C,cAAYhC,aAAcgB,CAAAA,aAAab,OAAO8B,SAAQ;oBACtD7B,OAAOA;oBACPC,WAAWA;oBACXC,YAAYA;oBACZC,UAAUC,gBAAgBD;oBACzB,GAAGL,WAAW;oBACfD,WAAWN,oBAAoB;wBAC7BM,WAAWC,aAAaD;wBACxBW;oBACF;oBACAsB,SAAS,CAACC;wBACRjC,aAAagC,UAAUC;wBACvB,MAAMC,YAAYlB,KAAKY,OAAO;wBAC9B,IAAI,CAACM,WAAW;4BACd;wBACF;wBAEAA,UAAUC,QAAQ,CAChB1B,mBAAmB;4BACjBQ;4BACAmB,SAAS,CAACzB;4BACVD;4BACAwB;4BACAG,WAAWxB;wBACb;oBAEJ;8BAECN;;;YAGJM,yBAAW,KAACY;gBAAK5B,KAAKuB;;;;AAG7B,GAAG"}
@@ -5,6 +5,7 @@
5
5
  @use "sass:map";
6
6
 
7
7
  @use "../utils";
8
+ @use "../spacing";
8
9
  @use "../theme/theme";
9
10
  @use "../transition/transition";
10
11
  @use "../typography/typography";
@@ -75,7 +76,7 @@ $typography: map.remove(typography.$button-styles, line-height) !default;
75
76
 
76
77
  /// The default gap between the `Tab` icon and children.
77
78
  /// @type Number
78
- $gap: icon.$spacing !default;
79
+ $gap: spacing.get-var(sm) !default;
79
80
 
80
81
  /// The default `Tab` height.
81
82
  /// @type Number
@@ -87,11 +88,11 @@ $stacked-height: 4.5rem !default;
87
88
 
88
89
  /// The default `Tab` horizontal padding.
89
90
  /// @type Number
90
- $horizontal-padding: 1rem !default;
91
+ $horizontal-padding: spacing.get-var(md) !default;
91
92
 
92
93
  /// The default `Tab` vertical padding while `stacked`.
93
94
  /// @type Number
94
- $vertical-padding: 0.75rem !default;
95
+ $vertical-padding: calc(spacing.get-var(sm) * 1.5) !default;
95
96
 
96
97
  /// The `Tab` min width.
97
98
  /// @type Number
@@ -131,7 +132,9 @@ $transition-timing-function: transition.$linear-timing-function !default;
131
132
 
132
133
  /// The default padding for a `TabList` with the `padded` prop enabled.
133
134
  /// @type Number
134
- $tablist-scrollable-horizontal-padding: 3.25rem !default;
135
+ $tablist-scrollable-horizontal-padding: calc(
136
+ spacing.get-var(xl) * 1.625
137
+ ) !default;
135
138
 
136
139
  /// The default z-index for a `TabList` scroll button.
137
140
  /// @type Number
@@ -1,4 +1,4 @@
1
- import { black, white } from "./colors.js";
1
+ /* eslint-disable no-param-reassign */ import { black, white } from "./colors.js";
2
2
  const RGB_REGEX = /^rgb\(((\b([01]?\d\d?|2[0-4]\d|25[0-5])\b),?){3}\)$/;
3
3
  const SHORTHAND_REGEX = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
4
4
  const VERBOSE_REGEX = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
@@ -25,7 +25,7 @@ const VERBOSE_REGEX = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;
25
25
  }
26
26
  export function getRGB(color) {
27
27
  // chrome 102.0.50005.63 apparently has whitespace when calling `window.getComputedStyle(element)`
28
- // remove whitepsace to make it easy for supporting rgb or hex
28
+ // remove whitespace to make it easy for supporting rgb or hex
29
29
  color = color.replace(/\s/g, "");
30
30
  const rgbMatches = color.match(RGB_REGEX);
31
31
  if (rgbMatches) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/theme/utils.ts"],"sourcesContent":["import { black, white } from \"./colors.js\";\n\nconst RGB_REGEX = /^rgb\\(((\\b([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\b),?){3}\\)$/;\nconst SHORTHAND_REGEX = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nconst VERBOSE_REGEX = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n\nexport type RGB = readonly [red: number, green: number, blue: number];\n\n/**\n * Converts a hex string into an rgb value. This is useful for detecting color\n * contrast ratios and other stuff.\n *\n * @param hex - The hex string to convert\n * @returns an object containing the r, g, b values for the color.\n */\nexport function hexToRGB(hex: string): RGB {\n if (\n process.env.NODE_ENV !== \"production\" &&\n !SHORTHAND_REGEX.test(hex) &&\n !VERBOSE_REGEX.test(hex)\n ) {\n throw new TypeError(\"Invalid color string.\");\n }\n\n hex = hex.replace(\n SHORTHAND_REGEX,\n (_m, r, g, b) => `${r}${r}${g}${g}${b}${b}`\n );\n\n const result = hex.match(VERBOSE_REGEX) || [];\n const r = parseInt(result[1] || \"\", 16) || 0;\n const g = parseInt(result[2] || \"\", 16) || 0;\n const b = parseInt(result[3] || \"\", 16) || 0;\n\n return [r, g, b];\n}\n\nexport function getRGB(color: string): RGB {\n // chrome 102.0.50005.63 apparently has whitespace when calling `window.getComputedStyle(element)`\n // remove whitepsace to make it easy for supporting rgb or hex\n color = color.replace(/\\s/g, \"\");\n const rgbMatches = color.match(RGB_REGEX);\n if (rgbMatches) {\n const r = parseInt(rgbMatches[1] || \"\", 16) || 0;\n const g = parseInt(rgbMatches[2] || \"\", 16) || 0;\n const b = parseInt(rgbMatches[3] || \"\", 16) || 0;\n\n return [r, g, b];\n }\n\n return hexToRGB(color);\n}\n\nconst RED_MULTIPLIER = 0.2126;\nconst GREEN_MULTIPLIER = 0.7152;\nconst BLUE_MULTIPLIER = 0.0722;\n\n/**\n * I really couldn't figure out how to name these \"magic\" numbers since the\n * formula doesn't really describe it much:\n *\n * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @internal\n */\nfunction get8BitColor(color: number): number {\n color /= 255;\n\n if (color <= 0.03928) {\n return color / 12.92;\n }\n\n return ((color + 0.055) / 1.055) ** 2.4;\n}\n\n/**\n * A number closest to 0 should be closest to black while a number closest to 1\n * should be closest to white.\n *\n * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @internal\n */\nexport function getLuminance(color: string): number {\n const [r, g, b] = getRGB(color);\n\n const red = get8BitColor(r) * RED_MULTIPLIER;\n const green = get8BitColor(g) * GREEN_MULTIPLIER;\n const blue = get8BitColor(b) * BLUE_MULTIPLIER;\n\n return red + green + blue;\n}\n\n/**\n * Gets the contrast ratio between a background color and a foreground color.\n *\n * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param background - The background color\n * @param foreground - The foreground color. This is normally the `color` css\n * value.\n * @returns the contrast ratio between the background and foreground colors.\n */\nexport function getContrastRatio(\n background: string,\n foreground: string\n): number {\n const backgroundLuminance = getLuminance(background) + 0.05;\n const foregroundLuminance = getLuminance(foreground) + 0.05;\n\n return (\n Math.max(backgroundLuminance, foregroundLuminance) /\n Math.min(backgroundLuminance, foregroundLuminance)\n );\n}\n\n/**\n * The type of contrast ratio compliance to confirm to. The ratios in order are:\n * - 3:1 for large text (18pt normal or 14pt bold)\n * - 4.5:1 for normal text\n * - 7:1 for Level AAA requirements.\n *\n * @see https://www.w3.org/TR/WCAG20/#visual-audio-contrast\n * @see https://www.w3.org/TR/WCAG20/#larger-scaledef\n */\nexport type ContrastRatioCompliance = \"large\" | \"normal\" | \"AAA\";\n\n/**\n * The contrast ratio that can be used for large text where large text is\n * considered 18pt or 14pt bold.\n */\nexport const LARGE_TEXT_CONTRAST_RATIO = 3;\n\n/**\n * The contrast ratio that can be used for normal text.\n */\nexport const NORMAL_TEXT_CONTRAST_RATIO = 4.5;\n\n/**\n * The AAA contrast ratio for passing WGAC 2.0 color contrast ratios.\n */\nexport const AAA_CONTRAST_RATIO = 7;\n\n/**\n * Checks if there is an acceptable contrast ratio between the background and\n * foreground colors based on the provided compliance level.\n *\n * @param background - The background color to check against\n * @param foreground - The foreground color to check against\n * @param compliance - The compliance level to use or a custom number as a\n * ratio.\n * @returns true if there is enough contrast between the foreground and\n * background colors for the provided compliance level.\n */\nexport function isContrastCompliant(\n background: string,\n foreground: string,\n compliance: ContrastRatioCompliance | number = \"normal\"\n): boolean {\n let ratio: number;\n switch (compliance) {\n case \"large\":\n ratio = LARGE_TEXT_CONTRAST_RATIO;\n break;\n case \"normal\":\n ratio = NORMAL_TEXT_CONTRAST_RATIO;\n break;\n case \"AAA\":\n ratio = AAA_CONTRAST_RATIO;\n break;\n default:\n ratio = compliance;\n }\n\n return getContrastRatio(background, foreground) >= ratio;\n}\n\n/**\n * Returns the highest contrast color to the provided `backgroundColor`. This is\n * normally used to ensure that a new background color can use an accessible text\n * color of either `#000` or `#fff`.\n *\n * This is pretty much a javascript implementation as the `contrast-color` Sass\n * function.\n *\n * @since 6.0.0\n */\nexport function contrastColor(\n backgroundColor: string,\n lightColor = white,\n darkColor = black\n): string {\n const lightContrast = getContrastRatio(backgroundColor, lightColor);\n const darkContrast = getContrastRatio(backgroundColor, darkColor);\n\n return lightContrast > darkContrast ? lightColor : darkColor;\n}\n"],"names":["black","white","RGB_REGEX","SHORTHAND_REGEX","VERBOSE_REGEX","hexToRGB","hex","process","env","NODE_ENV","test","TypeError","replace","_m","r","g","b","result","match","parseInt","getRGB","color","rgbMatches","RED_MULTIPLIER","GREEN_MULTIPLIER","BLUE_MULTIPLIER","get8BitColor","getLuminance","red","green","blue","getContrastRatio","background","foreground","backgroundLuminance","foregroundLuminance","Math","max","min","LARGE_TEXT_CONTRAST_RATIO","NORMAL_TEXT_CONTRAST_RATIO","AAA_CONTRAST_RATIO","isContrastCompliant","compliance","ratio","contrastColor","backgroundColor","lightColor","darkColor","lightContrast","darkContrast"],"mappings":"AAAA,SAASA,KAAK,EAAEC,KAAK,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,kBAAkB;AACxB,MAAMC,gBAAgB;AAItB;;;;;;CAMC,GACD,OAAO,SAASC,SAASC,GAAW;IAClC,IACEC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACzB,CAACN,gBAAgBO,IAAI,CAACJ,QACtB,CAACF,cAAcM,IAAI,CAACJ,MACpB;QACA,MAAM,IAAIK,UAAU;IACtB;IAEAL,MAAMA,IAAIM,OAAO,CACfT,iBACA,CAACU,IAAIC,GAAGC,GAAGC,IAAM,GAAGF,IAAIA,IAAIC,IAAIA,IAAIC,IAAIA,GAAG;IAG7C,MAAMC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dC,UAAkB,EAClBC,UAAkB;IAElB,MAAMC,sBAAsBP,aAAaK,cAAc;IACvD,MAAMG,sBAAsBR,aAAaM,cAAc;IAEvD,OACEG,KAAKC,GAAG,CAACH,qBAAqBC,uBAC9BC,KAAKE,GAAG,CAACJ,qBAAqBC;AAElC;AAaA;;;CAGC,GACD,OAAO,MAAMI,4BAA4B,EAAE;AAE3C;;CAEC,GACD,OAAO,MAAMC,6BAA6B,IAAI;AAE9C;;CAEC,GACD,OAAO,MAAMC,qBAAqB,EAAE;AAEpC;;;;;;;;;;CAUC,GACD,OAAO,SAASC,oBACdV,UAAkB,EAClBC,UAAkB,EAClBU,aAA+C,QAAQ;IAEvD,IAAIC;IACJ,OAAQD;QACN,KAAK;YACHC,QAAQL;YACR;QACF,KAAK;YACHK,QAAQJ;YACR;QACF,KAAK;YACHI,QAAQH;YACR;QACF;YACEG,QAAQD;IACZ;IAEA,OAAOZ,iBAAiBC,YAAYC,eAAeW;AACrD;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASC,cACdC,eAAuB,EACvBC,aAAa9C,KAAK,EAClB+C,YAAYhD,KAAK;IAEjB,MAAMiD,gBAAgBlB,iBAAiBe,iBAAiBC;IACxD,MAAMG,eAAenB,iBAAiBe,iBAAiBE;IAEvD,OAAOC,gBAAgBC,eAAeH,aAAaC;AACrD"}
1
+ {"version":3,"sources":["../../src/theme/utils.ts"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport { black, white } from \"./colors.js\";\n\nconst RGB_REGEX = /^rgb\\(((\\b([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\b),?){3}\\)$/;\nconst SHORTHAND_REGEX = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\nconst VERBOSE_REGEX = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i;\n\nexport type RGB = readonly [red: number, green: number, blue: number];\n\n/**\n * Converts a hex string into an rgb value. This is useful for detecting color\n * contrast ratios and other stuff.\n *\n * @param hex - The hex string to convert\n * @returns an object containing the r, g, b values for the color.\n */\nexport function hexToRGB(hex: string): RGB {\n if (\n process.env.NODE_ENV !== \"production\" &&\n !SHORTHAND_REGEX.test(hex) &&\n !VERBOSE_REGEX.test(hex)\n ) {\n throw new TypeError(\"Invalid color string.\");\n }\n\n hex = hex.replace(\n SHORTHAND_REGEX,\n (_m, r, g, b) => `${r}${r}${g}${g}${b}${b}`\n );\n\n const result = hex.match(VERBOSE_REGEX) || [];\n const r = parseInt(result[1] || \"\", 16) || 0;\n const g = parseInt(result[2] || \"\", 16) || 0;\n const b = parseInt(result[3] || \"\", 16) || 0;\n\n return [r, g, b];\n}\n\nexport function getRGB(color: string): RGB {\n // chrome 102.0.50005.63 apparently has whitespace when calling `window.getComputedStyle(element)`\n // remove whitespace to make it easy for supporting rgb or hex\n color = color.replace(/\\s/g, \"\");\n const rgbMatches = color.match(RGB_REGEX);\n if (rgbMatches) {\n const r = parseInt(rgbMatches[1] || \"\", 16) || 0;\n const g = parseInt(rgbMatches[2] || \"\", 16) || 0;\n const b = parseInt(rgbMatches[3] || \"\", 16) || 0;\n\n return [r, g, b];\n }\n\n return hexToRGB(color);\n}\n\nconst RED_MULTIPLIER = 0.2126;\nconst GREEN_MULTIPLIER = 0.7152;\nconst BLUE_MULTIPLIER = 0.0722;\n\n/**\n * I really couldn't figure out how to name these \"magic\" numbers since the\n * formula doesn't really describe it much:\n *\n * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @internal\n */\nfunction get8BitColor(color: number): number {\n color /= 255;\n\n if (color <= 0.03928) {\n return color / 12.92;\n }\n\n return ((color + 0.055) / 1.055) ** 2.4;\n}\n\n/**\n * A number closest to 0 should be closest to black while a number closest to 1\n * should be closest to white.\n *\n * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @internal\n */\nexport function getLuminance(color: string): number {\n const [r, g, b] = getRGB(color);\n\n const red = get8BitColor(r) * RED_MULTIPLIER;\n const green = get8BitColor(g) * GREEN_MULTIPLIER;\n const blue = get8BitColor(b) * BLUE_MULTIPLIER;\n\n return red + green + blue;\n}\n\n/**\n * Gets the contrast ratio between a background color and a foreground color.\n *\n * @see https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n *\n * @param background - The background color\n * @param foreground - The foreground color. This is normally the `color` css\n * value.\n * @returns the contrast ratio between the background and foreground colors.\n */\nexport function getContrastRatio(\n background: string,\n foreground: string\n): number {\n const backgroundLuminance = getLuminance(background) + 0.05;\n const foregroundLuminance = getLuminance(foreground) + 0.05;\n\n return (\n Math.max(backgroundLuminance, foregroundLuminance) /\n Math.min(backgroundLuminance, foregroundLuminance)\n );\n}\n\n/**\n * The type of contrast ratio compliance to confirm to. The ratios in order are:\n * - 3:1 for large text (18pt normal or 14pt bold)\n * - 4.5:1 for normal text\n * - 7:1 for Level AAA requirements.\n *\n * @see https://www.w3.org/TR/WCAG20/#visual-audio-contrast\n * @see https://www.w3.org/TR/WCAG20/#larger-scaledef\n */\nexport type ContrastRatioCompliance = \"large\" | \"normal\" | \"AAA\";\n\n/**\n * The contrast ratio that can be used for large text where large text is\n * considered 18pt or 14pt bold.\n */\nexport const LARGE_TEXT_CONTRAST_RATIO = 3;\n\n/**\n * The contrast ratio that can be used for normal text.\n */\nexport const NORMAL_TEXT_CONTRAST_RATIO = 4.5;\n\n/**\n * The AAA contrast ratio for passing WGAC 2.0 color contrast ratios.\n */\nexport const AAA_CONTRAST_RATIO = 7;\n\n/**\n * Checks if there is an acceptable contrast ratio between the background and\n * foreground colors based on the provided compliance level.\n *\n * @param background - The background color to check against\n * @param foreground - The foreground color to check against\n * @param compliance - The compliance level to use or a custom number as a\n * ratio.\n * @returns true if there is enough contrast between the foreground and\n * background colors for the provided compliance level.\n */\nexport function isContrastCompliant(\n background: string,\n foreground: string,\n compliance: ContrastRatioCompliance | number = \"normal\"\n): boolean {\n let ratio: number;\n switch (compliance) {\n case \"large\":\n ratio = LARGE_TEXT_CONTRAST_RATIO;\n break;\n case \"normal\":\n ratio = NORMAL_TEXT_CONTRAST_RATIO;\n break;\n case \"AAA\":\n ratio = AAA_CONTRAST_RATIO;\n break;\n default:\n ratio = compliance;\n }\n\n return getContrastRatio(background, foreground) >= ratio;\n}\n\n/**\n * Returns the highest contrast color to the provided `backgroundColor`. This is\n * normally used to ensure that a new background color can use an accessible text\n * color of either `#000` or `#fff`.\n *\n * This is pretty much a javascript implementation as the `contrast-color` Sass\n * function.\n *\n * @since 6.0.0\n */\nexport function contrastColor(\n backgroundColor: string,\n lightColor = white,\n darkColor = black\n): string {\n const lightContrast = getContrastRatio(backgroundColor, lightColor);\n const darkContrast = getContrastRatio(backgroundColor, darkColor);\n\n return lightContrast > darkContrast ? lightColor : darkColor;\n}\n"],"names":["black","white","RGB_REGEX","SHORTHAND_REGEX","VERBOSE_REGEX","hexToRGB","hex","process","env","NODE_ENV","test","TypeError","replace","_m","r","g","b","result","match","parseInt","getRGB","color","rgbMatches","RED_MULTIPLIER","GREEN_MULTIPLIER","BLUE_MULTIPLIER","get8BitColor","getLuminance","red","green","blue","getContrastRatio","background","foreground","backgroundLuminance","foregroundLuminance","Math","max","min","LARGE_TEXT_CONTRAST_RATIO","NORMAL_TEXT_CONTRAST_RATIO","AAA_CONTRAST_RATIO","isContrastCompliant","compliance","ratio","contrastColor","backgroundColor","lightColor","darkColor","lightContrast","darkContrast"],"mappings":"AAAA,oCAAoC,GACpC,SAASA,KAAK,EAAEC,KAAK,QAAQ,cAAc;AAE3C,MAAMC,YAAY;AAClB,MAAMC,kBAAkB;AACxB,MAAMC,gBAAgB;AAItB;;;;;;CAMC,GACD,OAAO,SAASC,SAASC,GAAW;IAClC,IACEC,QAAQC,GAAG,CAACC,QAAQ,KAAK,gBACzB,CAACN,gBAAgBO,IAAI,CAACJ,QACtB,CAACF,cAAcM,IAAI,CAACJ,MACpB;QACA,MAAM,IAAIK,UAAU;IACtB;IAEAL,MAAMA,IAAIM,OAAO,CACfT,iBACA,CAACU,IAAIC,GAAGC,G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