@economic/taco 1.1.5-alpha.102 → 1.1.5-alpha.127

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 (162) hide show
  1. package/dist/components/Accordion/Accordion.stories.d.ts +26 -0
  2. package/dist/components/Backdrop/Backdrop.stories.d.ts +7 -0
  3. package/dist/components/Badge/Badge.stories.d.ts +15 -0
  4. package/dist/components/Banner/Banner.stories.d.ts +23 -0
  5. package/dist/components/Button/Button.stories.d.ts +69 -0
  6. package/dist/components/Calendar/Calendar.d.ts +3 -1
  7. package/dist/components/Calendar/Calendar.stories.d.ts +13 -0
  8. package/dist/components/Card/Card.stories.d.ts +12 -0
  9. package/dist/components/Datepicker/Datepicker.stories.d.ts +43 -0
  10. package/dist/components/Dialog/Dialog.d.ts +1 -1
  11. package/dist/components/Dialog/Dialog.stories.d.ts +54 -0
  12. package/dist/components/Field/Field.stories.d.ts +14 -0
  13. package/dist/components/Form/Form.stories.d.ts +14 -0
  14. package/dist/components/Group/Group.d.ts +11 -1
  15. package/dist/components/Group/Group.stories.d.ts +23 -0
  16. package/dist/components/Hanger/Hanger.stories.d.ts +11 -0
  17. package/dist/components/HoverCard/HoverCard.stories.d.ts +28 -0
  18. package/dist/components/Icon/Icon.stories.d.ts +24 -0
  19. package/dist/components/Icon/components/ChevronLeftSolid.d.ts +3 -0
  20. package/dist/components/Icon/components/ChevronRightSolid.d.ts +3 -0
  21. package/dist/components/Icon/components/index.d.ts +1 -1
  22. package/dist/components/IconButton/IconButton.stories.d.ts +45 -0
  23. package/dist/components/Input/Input.d.ts +1 -1
  24. package/dist/components/Input/Input.stories.d.ts +43 -0
  25. package/dist/components/Listbox/Listbox.stories.d.ts +44 -0
  26. package/dist/components/Menu/Menu.d.ts +2 -2
  27. package/dist/components/Menu/Menu.stories.d.ts +93 -0
  28. package/dist/components/Menu/components/Item.d.ts +1 -1
  29. package/dist/components/Menu/components/Link.d.ts +1 -1
  30. package/dist/components/Navigation/Navigation.stories.d.ts +7 -0
  31. package/dist/components/Pagination/Pagination.stories.d.ts +28 -0
  32. package/dist/components/Popover/Popover.stories.d.ts +14 -0
  33. package/dist/components/Progress/Progress.stories.d.ts +8 -0
  34. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +49 -0
  35. package/dist/components/SearchInput/SearchInput.stories.d.ts +41 -0
  36. package/dist/components/Select/Select.stories.d.ts +35 -0
  37. package/dist/components/Spinner/Spinner.stories.d.ts +15 -0
  38. package/dist/components/Table/Table.stories.d.ts +32 -0
  39. package/dist/components/Table/util/rowIndexPath.d.ts +2 -2
  40. package/dist/components/Tabs/Tabs.stories.d.ts +19 -0
  41. package/dist/components/Textarea/Textarea.stories.d.ts +40 -0
  42. package/dist/components/Toast/Toast.d.ts +2 -2
  43. package/dist/components/Toast/Toast.stories.d.ts +12 -0
  44. package/dist/components/Toast/Toaster.d.ts +2 -2
  45. package/dist/components/Tooltip/Tooltip.stories.d.ts +25 -0
  46. package/dist/components/Tour/Tour.stories.d.ts +11 -0
  47. package/dist/css/Typography.stories.d.ts +6 -0
  48. package/dist/esm/components/Badge/Badge.js +1 -1
  49. package/dist/esm/components/Badge/Badge.js.map +1 -1
  50. package/dist/esm/components/Calendar/Calendar.js +4 -11
  51. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  52. package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
  53. package/dist/esm/components/Combobox/Combobox.js.map +1 -1
  54. package/dist/esm/components/Combobox/useCombobox.js +12 -13
  55. package/dist/esm/components/Combobox/useCombobox.js.map +1 -1
  56. package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
  57. package/dist/esm/components/Dialog/Dialog.js +39 -58
  58. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  59. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  60. package/dist/esm/components/Dialog/components/Drawer.js.map +1 -1
  61. package/dist/esm/components/Field/Field.js +10 -12
  62. package/dist/esm/components/Field/Field.js.map +1 -1
  63. package/dist/esm/components/Form/Form.js +6 -8
  64. package/dist/esm/components/Form/Form.js.map +1 -1
  65. package/dist/esm/components/Group/Group.js +9 -8
  66. package/dist/esm/components/Group/Group.js.map +1 -1
  67. package/dist/esm/components/Hanger/Hanger.js +27 -35
  68. package/dist/esm/components/Hanger/Hanger.js.map +1 -1
  69. package/dist/esm/components/HoverCard/HoverCard.js +8 -9
  70. package/dist/esm/components/HoverCard/HoverCard.js.map +1 -1
  71. package/dist/esm/components/Icon/Icon.js +7 -8
  72. package/dist/esm/components/Icon/Icon.js.map +1 -1
  73. package/dist/esm/components/Icon/components/ChevronLeftSolid.js +20 -0
  74. package/dist/esm/components/Icon/components/ChevronLeftSolid.js.map +1 -0
  75. package/dist/esm/components/Icon/components/ChevronRightSolid.js +20 -0
  76. package/dist/esm/components/Icon/components/ChevronRightSolid.js.map +1 -0
  77. package/dist/esm/components/Icon/components/index.js +4 -0
  78. package/dist/esm/components/Icon/components/index.js.map +1 -1
  79. package/dist/esm/components/IconButton/IconButton.js +9 -11
  80. package/dist/esm/components/IconButton/IconButton.js.map +1 -1
  81. package/dist/esm/components/Input/Input.js +25 -25
  82. package/dist/esm/components/Input/Input.js.map +1 -1
  83. package/dist/esm/components/Listbox/Listbox.js +24 -25
  84. package/dist/esm/components/Listbox/Listbox.js.map +1 -1
  85. package/dist/esm/components/Listbox/ScrollableList.js +2 -2
  86. package/dist/esm/components/Listbox/ScrollableList.js.map +1 -1
  87. package/dist/esm/components/Listbox/useListbox.js +3 -2
  88. package/dist/esm/components/Listbox/useListbox.js.map +1 -1
  89. package/dist/esm/components/Listbox/useMultiListbox.js +7 -7
  90. package/dist/esm/components/Listbox/useMultiListbox.js.map +1 -1
  91. package/dist/esm/components/Menu/Menu.js +16 -34
  92. package/dist/esm/components/Menu/Menu.js.map +1 -1
  93. package/dist/esm/components/Menu/components/Content.js.map +1 -1
  94. package/dist/esm/components/Menu/components/RadioGroup.js.map +1 -1
  95. package/dist/esm/components/Navigation/Navigation.js +36 -44
  96. package/dist/esm/components/Navigation/Navigation.js.map +1 -1
  97. package/dist/esm/components/Pagination/PageNumbers.js.map +1 -1
  98. package/dist/esm/components/Pagination/Pagination.js +39 -56
  99. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  100. package/dist/esm/components/Pagination/usePaginationShortcuts.js +4 -5
  101. package/dist/esm/components/Pagination/usePaginationShortcuts.js.map +1 -1
  102. package/dist/esm/components/Popover/Popover.js +29 -34
  103. package/dist/esm/components/Popover/Popover.js.map +1 -1
  104. package/dist/esm/components/Popover/Primitives.js.map +1 -1
  105. package/dist/esm/components/Progress/Progress.js +11 -15
  106. package/dist/esm/components/Progress/Progress.js.map +1 -1
  107. package/dist/esm/components/Provider/Provider.js +13 -18
  108. package/dist/esm/components/Provider/Provider.js.map +1 -1
  109. package/dist/esm/components/RadioGroup/RadioGroup.js +45 -57
  110. package/dist/esm/components/RadioGroup/RadioGroup.js.map +1 -1
  111. package/dist/esm/components/SearchInput/SearchInput.js +10 -12
  112. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  113. package/dist/esm/components/Select/Select.js +30 -31
  114. package/dist/esm/components/Select/Select.js.map +1 -1
  115. package/dist/esm/components/Select/useSelect.js +6 -7
  116. package/dist/esm/components/Select/useSelect.js.map +1 -1
  117. package/dist/esm/components/Spinner/Spinner.js +12 -19
  118. package/dist/esm/components/Spinner/Spinner.js.map +1 -1
  119. package/dist/esm/components/Switch/Switch.js +9 -10
  120. package/dist/esm/components/Switch/Switch.js.map +1 -1
  121. package/dist/esm/components/Table/components/BaseTable.js.map +1 -1
  122. package/dist/esm/components/Table/components/WindowedTable.js.map +1 -1
  123. package/dist/esm/components/Table/hooks/plugins/useRowActions.js +2 -3
  124. package/dist/esm/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  125. package/dist/esm/components/Table/hooks/useTable.js +5 -1
  126. package/dist/esm/components/Table/hooks/useTable.js.map +1 -1
  127. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +18 -13
  128. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  129. package/dist/esm/components/Table/util/rowIndexPath.js.map +1 -1
  130. package/dist/esm/components/Tabs/Tabs.js +25 -27
  131. package/dist/esm/components/Tabs/Tabs.js.map +1 -1
  132. package/dist/esm/components/Textarea/Textarea.js +11 -9
  133. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  134. package/dist/esm/components/Toast/Toast.js +6 -1
  135. package/dist/esm/components/Toast/Toast.js.map +1 -1
  136. package/dist/esm/components/Toast/Toaster.js +88 -118
  137. package/dist/esm/components/Toast/Toaster.js.map +1 -1
  138. package/dist/esm/components/Toast/util.js.map +1 -1
  139. package/dist/esm/components/Tooltip/Tooltip.js +7 -8
  140. package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
  141. package/dist/esm/components/Tour/Tour.js +46 -53
  142. package/dist/esm/components/Tour/Tour.js.map +1 -1
  143. package/dist/esm/components/Treeview/Treeview.js +26 -36
  144. package/dist/esm/components/Treeview/Treeview.js.map +1 -1
  145. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js +1 -1
  146. package/dist/esm/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
  147. package/dist/esm/index.css +623 -635
  148. package/dist/esm/index.js +1 -1
  149. package/dist/esm/primitives/Button.js.map +1 -1
  150. package/dist/esm/utils/hooks/useListKeyboardNavigation.js +10 -11
  151. package/dist/esm/utils/hooks/useListKeyboardNavigation.js.map +1 -1
  152. package/dist/esm/utils/input.js +1 -1
  153. package/dist/esm/utils/input.js.map +1 -1
  154. package/dist/index.css +623 -635
  155. package/dist/primitives/Button.d.ts +2 -1
  156. package/dist/taco.cjs.development.js +709 -783
  157. package/dist/taco.cjs.development.js.map +1 -1
  158. package/dist/taco.cjs.production.min.js +1 -1
  159. package/dist/taco.cjs.production.min.js.map +1 -1
  160. package/dist/utils/hooks/useListKeyboardNavigation.d.ts +1 -1
  161. package/package.json +5 -6
  162. package/types.json +18 -4
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { PaginationProps } from '../..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & import("./usePagination").usePaginationValues & {
6
+ length: number;
7
+ pageSizes?: number[] | undefined;
8
+ showPageControls?: boolean | undefined;
9
+ showPageNumbers?: boolean | undefined;
10
+ showPageSize?: boolean | undefined;
11
+ dangerouslyHijackGlobalKeyboardNavigation?: boolean | undefined;
12
+ } & React.RefAttributes<HTMLDivElement>>;
13
+ argTypes: {};
14
+ args: {
15
+ length: number;
16
+ pageSizes: number[];
17
+ showPageControls: boolean;
18
+ showPageNumbers: boolean;
19
+ showPageSize: boolean;
20
+ pageIndex: number;
21
+ pageSize: number;
22
+ dangerouslyHijackGlobalKeyboardNavigation: boolean;
23
+ };
24
+ };
25
+ export default _default;
26
+ export declare const Default: (args: PaginationProps) => JSX.Element;
27
+ export declare const LocalizedPagination: (args: PaginationProps) => JSX.Element;
28
+ export declare const KitchenSink: () => JSX.Element;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("./Popover").ForwardedPopoverWithStatics;
5
+ };
6
+ export default _default;
7
+ export declare const Basic: () => JSX.Element;
8
+ export declare const Placement: () => JSX.Element;
9
+ export declare const Close: () => JSX.Element;
10
+ export declare const RenderProp: {
11
+ (): JSX.Element;
12
+ storyName: string;
13
+ };
14
+ export declare const Test: () => JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({ duration, ...props }: import("./Progress").ProgressProps) => JSX.Element;
5
+ };
6
+ export default _default;
7
+ export declare const Duration: () => JSX.Element;
8
+ export declare const Indeterminate: () => JSX.Element;
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ import { RadioGroupProps } from './RadioGroup';
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("./RadioGroup").ForwardedRadioGroupWithStatics;
6
+ argTypes: {
7
+ disabled: {
8
+ type: string;
9
+ };
10
+ orientation: {
11
+ options: string[];
12
+ control: {
13
+ type: string;
14
+ };
15
+ };
16
+ };
17
+ args: {
18
+ disabled: boolean;
19
+ };
20
+ };
21
+ export default _default;
22
+ export declare const Controlled: ({ defaultValue: _, ...args }: RadioGroupProps) => JSX.Element;
23
+ export declare const Uncontrolled: {
24
+ (args: RadioGroupProps): JSX.Element;
25
+ args: {
26
+ defaultValue: number;
27
+ };
28
+ };
29
+ export declare const Value: {
30
+ (args: any): JSX.Element;
31
+ args: {
32
+ defaultValue: number;
33
+ };
34
+ };
35
+ export declare const Horizontal: {
36
+ (args: RadioGroupProps): JSX.Element;
37
+ args: {
38
+ defaultValue: number;
39
+ orientation: string;
40
+ };
41
+ };
42
+ export declare const Invalid: {
43
+ (args: RadioGroupProps): JSX.Element;
44
+ args: {
45
+ defaultValue: number;
46
+ invalid: boolean;
47
+ };
48
+ };
49
+ export declare const SmallContainer: (args: RadioGroupProps) => JSX.Element;
@@ -0,0 +1,41 @@
1
+ import React from 'react';
2
+ import { SearchInputProps } from '../..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Pick<import("../..").InputProps, "id" | "button" | "form" | "slot" | "style" | "title" | "pattern" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "name" | "height" | "max" | "min" | "type" | "width" | "crossOrigin" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "step" | "size" | "checked" | "highlighted" | "invalid" | "required" | "accept" | "alt" | "autoComplete" | "capture" | "enterKeyHint" | "maxLength" | "minLength" | "multiple" | "readOnly" | "src"> & {
6
+ onSearch?: ((value: string | number | readonly string[] | undefined) => void) | undefined;
7
+ } & React.RefAttributes<HTMLInputElement>>;
8
+ args: {
9
+ placeholder: string;
10
+ name: string;
11
+ value: string;
12
+ disabled: boolean;
13
+ highlighted: boolean;
14
+ invalid: boolean;
15
+ readOnly: boolean;
16
+ };
17
+ argTypes: {
18
+ disabled: {
19
+ control: {
20
+ type: string;
21
+ };
22
+ };
23
+ highlighted: {
24
+ control: {
25
+ type: string;
26
+ };
27
+ };
28
+ invalid: {
29
+ control: {
30
+ type: string;
31
+ };
32
+ };
33
+ readOnly: {
34
+ control: {
35
+ type: string;
36
+ };
37
+ };
38
+ };
39
+ };
40
+ export default _default;
41
+ export declare const Default: (args: SearchInputProps) => JSX.Element;
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import { SelectProps } from './Select';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<Pick<import("../..").ListboxProps, "id" | "data" | "form" | "slot" | "style" | "title" | "pattern" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "name" | "height" | "max" | "min" | "type" | "width" | "crossOrigin" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "step" | "size" | "checked" | "highlighted" | "invalid" | "required" | "accept" | "alt" | "autoComplete" | "capture" | "enterKeyHint" | "maxLength" | "minLength" | "multiple" | "readOnly" | "src" | "emptyValue" | "loading"> & Pick<import("../..").ComboboxProps, "id" | "data" | "dialog" | "form" | "slot" | "style" | "title" | "pattern" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "name" | "height" | "max" | "min" | "type" | "width" | "crossOrigin" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "value" | "step" | "size" | "icon" | "checked" | "highlighted" | "invalid" | "required" | "accept" | "alt" | "autoComplete" | "capture" | "enterKeyHint" | "maxLength" | "minLength" | "multiple" | "readOnly" | "src" | "emptyValue" | "loading" | "onSearch"> & {
6
+ multiselect?: boolean | undefined;
7
+ } & {
8
+ editable?: boolean | undefined;
9
+ } & React.RefAttributes<HTMLInputElement>>;
10
+ argTypes: {
11
+ defaultValue: {
12
+ control: string;
13
+ };
14
+ };
15
+ args: {
16
+ data: any[];
17
+ editable: boolean;
18
+ multiselect: boolean;
19
+ loading: boolean;
20
+ readOnly: boolean;
21
+ disabled: boolean;
22
+ defaultValue: undefined;
23
+ };
24
+ };
25
+ export default _default;
26
+ export declare const Default: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
27
+ export declare const InvalidValue: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
28
+ export declare const EmptyValue: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
29
+ export declare const DefaultValue: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
30
+ export declare const Icons: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
31
+ export declare const MultiSelect: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
32
+ export declare const MultiSelectDefault: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
33
+ export declare const Hierarchical: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
34
+ export declare const LoadingSelect: ({ value: initialValue, data, ...args }: SelectProps) => JSX.Element;
35
+ export declare const KitchenSink: () => JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { SpinnerProps } from '../..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
6
+ delay?: number | undefined;
7
+ label?: string | undefined;
8
+ } & React.RefAttributes<HTMLDivElement>>;
9
+ args: {
10
+ label: string;
11
+ delay: number;
12
+ };
13
+ };
14
+ export default _default;
15
+ export declare const Default: (args: SpinnerProps) => JSX.Element;
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: import("./types").ForwardedGenericTableWithStatics;
5
+ };
6
+ export default _default;
7
+ export declare const Basic: () => JSX.Element;
8
+ export declare const EmptyState: () => JSX.Element;
9
+ export declare const ColumnAlignment: () => JSX.Element;
10
+ export declare const ColumnVisibility: () => JSX.Element;
11
+ export declare const ColumnGroups: () => JSX.Element;
12
+ export declare const Sorting: () => JSX.Element;
13
+ export declare const SortingExternal: () => JSX.Element;
14
+ export declare const SortingExternalManual: () => JSX.Element;
15
+ export declare const RowClick: () => JSX.Element;
16
+ export declare const RowSelection: () => JSX.Element;
17
+ export declare const RowExpansion: () => JSX.Element;
18
+ export declare const RowActions: () => JSX.Element;
19
+ export declare const ShowOnRow: () => JSX.Element;
20
+ export declare const RowActive: () => JSX.Element;
21
+ export declare const RowActiveDefault: () => JSX.Element;
22
+ export declare const RowActiveState: () => JSX.Element;
23
+ export declare const RowDragAndDrop: () => JSX.Element;
24
+ export declare const WindowedDragAndDrop: () => JSX.Element;
25
+ export declare const Pagination: () => JSX.Element;
26
+ export declare const PaginationExternal: () => JSX.Element;
27
+ export declare const Windowing: () => JSX.Element;
28
+ export declare const WindowingActiveIndex: () => JSX.Element;
29
+ export declare const WindowingInfiniteLoading: () => JSX.Element;
30
+ export declare const AdvancedSubRows: () => JSX.Element;
31
+ export declare const AdvancedInlineEditing: () => JSX.Element;
32
+ export declare const NativeTable: () => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { Row, RowIndexPath } from '../types';
2
2
  export declare const convertRowIndexPathToNumberArray: (rowIndexPath: RowIndexPath) => number[];
3
- export declare const getByRowIndexPath: <TRow>(data: Row<TRow>[], rowIndexPath: RowIndexPath) => Row<TRow> | undefined;
4
- export declare const setByRowIndexPath: <TRow>(data: Row<TRow>[], rowIndexPath: RowIndexPath, values: any) => Row<TRow>[];
3
+ export declare const getByRowIndexPath: <TRow extends {}>(data: Row<TRow>[], rowIndexPath: RowIndexPath) => Row<TRow> | undefined;
4
+ export declare const setByRowIndexPath: <TRow extends {}>(data: Row<TRow>[], rowIndexPath: RowIndexPath, values: any) => Row<TRow>[];
5
5
  export declare const getParentRowIndexPath: (rowIndexPath: RowIndexPath) => RowIndexPath;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { TabsProps } from '../..';
3
+ declare const _default: {
4
+ title: string;
5
+ component: import("./Tabs").ForwardedTabsWithStatics;
6
+ argType: {
7
+ orientation: {
8
+ type: string;
9
+ options: string[];
10
+ };
11
+ };
12
+ args: {
13
+ defaultId: string;
14
+ orientation: string;
15
+ onChange: (newTab: any) => void;
16
+ };
17
+ };
18
+ export default _default;
19
+ export declare const Default: (args: TabsProps) => JSX.Element;
@@ -0,0 +1,40 @@
1
+ import React from 'react';
2
+ declare const _default: {
3
+ title: string;
4
+ component: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
5
+ highlighted?: boolean | undefined;
6
+ invalid?: boolean | undefined;
7
+ value?: string | undefined;
8
+ } & React.RefAttributes<HTMLTextAreaElement>>;
9
+ args: {
10
+ disabled: boolean;
11
+ highlighted: boolean;
12
+ invalid: boolean;
13
+ readOnly: boolean;
14
+ };
15
+ argTypes: {
16
+ disabled: {
17
+ control: {
18
+ type: string;
19
+ };
20
+ };
21
+ highlighted: {
22
+ control: {
23
+ type: string;
24
+ };
25
+ };
26
+ invalid: {
27
+ control: {
28
+ type: string;
29
+ };
30
+ };
31
+ readOnly: {
32
+ control: {
33
+ type: string;
34
+ };
35
+ };
36
+ };
37
+ };
38
+ export default _default;
39
+ export declare const Default: (args: any) => JSX.Element;
40
+ export declare const KitchenSink: () => JSX.Element;
@@ -15,14 +15,14 @@ export declare type ToastOptions = {
15
15
  */
16
16
  type?: ToastType;
17
17
  };
18
+ export declare type ToastContent = Omit<React.ReactNode, 'null' | 'undefined'>;
18
19
  export declare type ToastProps = {
19
20
  /** Provide a unique id for toast */
20
21
  id: string;
21
22
  /**
22
23
  * Content can be any valid react node, for e.g. a `div`, or a simple text.
23
- * Note that content can also be `null`, resulting in a slimmer version of your toast with a vertically centered title
24
24
  */
25
- content: React.ReactNode;
25
+ content: ToastContent;
26
26
  /** Additional options to define your toast */
27
27
  options: ToastOptions;
28
28
  /**
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: ({ children, ...props }: import("./Toaster").ToastProviderProps) => JSX.Element;
5
+ args: {
6
+ autoClose: number;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const ToastStates: (args: any) => JSX.Element;
11
+ export declare const UpdatingToast: (args: any) => JSX.Element;
12
+ export declare const ProgrammaticallyCloseToast: (args: any) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { ToastOptions } from './Toast';
2
+ import { ToastOptions, ToastContent } from './Toast';
3
3
  import './Toast.css';
4
- declare type ToastCreator<T> = (content: React.ReactNode | ((close: () => void) => React.ReactNode), options?: ToastOptions) => T;
4
+ declare type ToastCreator<T> = (content: ToastContent | ((close: () => void) => ToastContent), options?: ToastOptions) => T;
5
5
  export interface Toaster<T> extends ToastCreator<T> {
6
6
  success: ToastCreator<T>;
7
7
  error: ToastCreator<T>;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { TooltipProps } from './Tooltip';
3
+ declare const _default: {
4
+ title: string;
5
+ component: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
6
+ children: any;
7
+ title: string;
8
+ placement?: "right" | "left" | "top" | "bottom" | undefined;
9
+ } & React.RefAttributes<HTMLElement>>;
10
+ argTypes: {
11
+ placement: {
12
+ control: {
13
+ type: string;
14
+ options: string[];
15
+ };
16
+ };
17
+ };
18
+ args: {
19
+ title: string;
20
+ placement: string;
21
+ };
22
+ };
23
+ export default _default;
24
+ export declare const Default: (args: TooltipProps) => JSX.Element;
25
+ export declare const TooltipOnElement: () => JSX.Element;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ component: {
5
+ (props: import("./Tour").TourProps): JSX.Element;
6
+ Step: (_props: import("./Tour").TourStepProps) => null;
7
+ };
8
+ };
9
+ export default _default;
10
+ export declare const Default: () => JSX.Element;
11
+ export declare const IntermittentFlow: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare const _default: {
3
+ title: string;
4
+ };
5
+ export default _default;
6
+ export declare const Default: () => JSX.Element;
@@ -16,7 +16,7 @@ var Badge = /*#__PURE__*/forwardRef(function Badge(props, ref) {
16
16
  state = props.state,
17
17
  otherProps = _objectWithoutPropertiesLoose(props, _excluded);
18
18
 
19
- var className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5', (_cn = {}, _cn[getOutlineClasses(state)] = outline, _cn["border-transparent " + getStateClasses(state)] = !outline, _cn['h-2 w-2 min-w-0'] = compact, _cn['h-5 py-0 px-1.5'] = !compact, _cn), props.className);
19
+ var className = cn('rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center', (_cn = {}, _cn[getOutlineClasses(state)] = outline, _cn["border-transparent " + getStateClasses(state)] = !outline, _cn['h-2 w-2 min-w-0'] = compact, _cn['h-5 py-0 px-1.5'] = !compact, _cn), props.className);
20
20
  return createElement("span", Object.assign({}, otherProps, {
21
21
  "aria-atomic": "true",
22
22
  "aria-live": "polite",
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\nimport { State } from '../../types';\nimport { getStateClasses, getOutlineClasses } from '../../utils/taillwind';\nimport './Badge.css';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /** Content should be a numerical value or tag/status like text **/\n children: React.ReactNode;\n /** Show compact version **/\n compact?: boolean;\n /** Show outlined version **/\n outline?: boolean;\n /** State will change the style of the badge **/\n state?: State;\n};\n\nexport const Badge = React.forwardRef(function Badge(props: BadgeProps, ref: React.Ref<HTMLSpanElement>) {\n const { children, compact = false, outline = false, state, ...otherProps } = props;\n const className = cn(\n 'rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center h-5',\n {\n [getOutlineClasses(state)]: outline,\n [`border-transparent ${getStateClasses(state)}`]: !outline,\n 'h-2 w-2 min-w-0': compact,\n 'h-5 py-0 px-1.5': !compact, // custom padding keeps single digits in a perfect circle\n },\n props.className\n );\n\n return (\n <span\n {...otherProps}\n aria-atomic=\"true\"\n aria-live=\"polite\"\n className={className}\n data-taco=\"badge\"\n ref={ref}\n role=\"status\"\n title={props['aria-label']}\n >\n {compact ? <VisuallyHidden>{children}</VisuallyHidden> : children}\n </span>\n );\n});\n"],"names":["Badge","React","props","ref","children","compact","outline","state","otherProps","className","cn","getOutlineClasses","getStateClasses","role","title","VisuallyHidden"],"mappings":";;;;;;;IAkBaA,KAAK,gBAAGC,UAAA,CAAiB,SAASD,KAAT,CAAeE,KAAf,EAAkCC,GAAlC;;;EAClC,IAAQC,QAAR,GAA6EF,KAA7E,CAAQE,QAAR;uBAA6EF,KAA7E,CAAkBG,OAAlB;MAAkBA,OAAlB,+BAA4B,KAA5B;uBAA6EH,KAA7E,CAAmCI,OAAnC;MAAmCA,OAAnC,+BAA6C,KAA7C;MAAoDC,KAApD,GAA6EL,KAA7E,CAAoDK,KAApD;MAA8DC,UAA9D,iCAA6EN,KAA7E;;EACA,IAAMO,SAAS,GAAGC,EAAE,CAChB,+HADgB,iBAGXC,iBAAiB,CAACJ,KAAD,CAHN,IAGgBD,OAHhB,8BAIWM,eAAe,CAACL,KAAD,CAJ1B,IAIsC,CAACD,OAJvC,MAKZ,iBALY,IAKOD,OALP,MAMZ,iBANY,IAMO,CAACA,OANR,QAQhBH,KAAK,CAACO,SARU,CAApB;EAWA,OACIR,aAAA,OAAA,oBACQO;mBACQ;iBACF;IACVC,SAAS,EAAEA;iBACD;IACVN,GAAG,EAAEA;IACLU,IAAI,EAAC;IACLC,KAAK,EAAEZ,KAAK,CAAC,YAAD;IARhB,EAUKG,OAAO,GAAGJ,aAAA,CAACc,cAAD,MAAA,EAAiBX,QAAjB,CAAH,GAAiDA,QAV7D,CADJ;AAcH,CA3BoB;;;;"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden';\nimport { State } from '../../types';\nimport { getStateClasses, getOutlineClasses } from '../../utils/taillwind';\nimport './Badge.css';\n\nexport type BadgeProps = React.HTMLAttributes<HTMLSpanElement> & {\n /** Content should be a numerical value or tag/status like text **/\n children: React.ReactNode;\n /** Show compact version **/\n compact?: boolean;\n /** Show outlined version **/\n outline?: boolean;\n /** State will change the style of the badge **/\n state?: State;\n};\n\nexport const Badge = React.forwardRef(function Badge(props: BadgeProps, ref: React.Ref<HTMLSpanElement>) {\n const { children, compact = false, outline = false, state, ...otherProps } = props;\n const className = cn(\n 'rounded-full border font-bold text-xs uppercase overflow-hidden whitespace-nowrap inline-flex items-center justify-center',\n {\n [getOutlineClasses(state)]: outline,\n [`border-transparent ${getStateClasses(state)}`]: !outline,\n 'h-2 w-2 min-w-0': compact,\n 'h-5 py-0 px-1.5': !compact, // custom padding keeps single digits in a perfect circle\n },\n props.className\n );\n\n return (\n <span\n {...otherProps}\n aria-atomic=\"true\"\n aria-live=\"polite\"\n className={className}\n data-taco=\"badge\"\n ref={ref}\n role=\"status\"\n title={props['aria-label']}>\n {compact ? <VisuallyHidden>{children}</VisuallyHidden> : children}\n </span>\n );\n});\n"],"names":["Badge","React","props","ref","children","compact","outline","state","otherProps","className","cn","getOutlineClasses","getStateClasses","role","title","VisuallyHidden"],"mappings":";;;;;;;IAkBaA,KAAK,gBAAGC,UAAA,CAAiB,SAASD,KAAT,CAAeE,KAAf,EAAkCC,GAAlC;;;EAClC,IAAQC,QAAR,GAA6EF,KAA7E,CAAQE,QAAR;uBAA6EF,KAA7E,CAAkBG,OAAlB;MAAkBA,OAAlB,+BAA4B,KAA5B;uBAA6EH,KAA7E,CAAmCI,OAAnC;MAAmCA,OAAnC,+BAA6C,KAA7C;MAAoDC,KAApD,GAA6EL,KAA7E,CAAoDK,KAApD;MAA8DC,UAA9D,iCAA6EN,KAA7E;;EACA,IAAMO,SAAS,GAAGC,EAAE,CAChB,2HADgB,iBAGXC,iBAAiB,CAACJ,KAAD,CAHN,IAGgBD,OAHhB,8BAIWM,eAAe,CAACL,KAAD,CAJ1B,IAIsC,CAACD,OAJvC,MAKZ,iBALY,IAKOD,OALP,MAMZ,iBANY,IAMO,CAACA,OANR,QAQhBH,KAAK,CAACO,SARU,CAApB;EAWA,OACIR,aAAA,OAAA,oBACQO;mBACQ;iBACF;IACVC,SAAS,EAAEA;iBACD;IACVN,GAAG,EAAEA;IACLU,IAAI,EAAC;IACLC,KAAK,EAAEZ,KAAK,CAAC,YAAD;IARhB,EASKG,OAAO,GAAGJ,aAAA,CAACc,cAAD,MAAA,EAAiBX,QAAjB,CAAH,GAAiDA,QAT7D,CADJ;AAaH,CA1BoB;;;;"}
@@ -5,14 +5,7 @@ import { IconButton } from '../IconButton/IconButton.js';
5
5
  import ReactDayPicker from 'react-day-picker';
6
6
  import { useLocalization } from '../Provider/Provider.js';
7
7
 
8
- var _excluded = ["onChange", "value"];
9
-
10
- var renderDay = function renderDay(day, modifiers) {
11
- return modifiers.disabled ? createElement("span", {
12
- className: "dot"
13
- }) : day.getDate();
14
- };
15
-
8
+ var _excluded = ["onChange", "value", "disabledDays"];
16
9
  var thisYear = /*#__PURE__*/new Date().getFullYear();
17
10
  var years = [];
18
11
 
@@ -84,6 +77,7 @@ var Navbar = /*#__PURE__*/memo(function (_ref) {
84
77
  var Calendar = /*#__PURE__*/forwardRef(function Calendar(props, ref) {
85
78
  var handleChange = props.onChange,
86
79
  value = props.value,
80
+ disabledDays = props.disabledDays,
87
81
  otherProps = _objectWithoutPropertiesLoose(props, _excluded);
88
82
 
89
83
  var _useLocalization2 = useLocalization(),
@@ -141,10 +135,9 @@ var Calendar = /*#__PURE__*/forwardRef(function Calendar(props, ref) {
141
135
  return null;
142
136
  },
143
137
  todayButton: texts.calendar.actions.today,
144
- showOutsideDays: true,
145
- renderDay: renderDay,
146
138
  numberOfMonths: 1,
147
- ref: ref
139
+ ref: ref,
140
+ disabledDays: disabledDays
148
141
  })));
149
142
  });
150
143
 
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sources":["../../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport ReactDayPicker, { NavbarElementProps, DayModifiers } from 'react-day-picker';\nimport { useLocalization } from '../Provider/Provider';\nimport './Calendar.css';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type CalendarTextsActions = {\n /** Aria-label for previous month action button */\n previousMonth: string;\n /** Aria-label for next month action button */\n nextMonth: string;\n /** Aria-label for previous year action button */\n previousYear: string;\n /** Aria-label for next year action button */\n nextYear: string;\n /** Text displayed within today action button */\n today: string;\n};\n\nexport type CalendarTexts = {\n /** Text and aria-label for action buttons in Calendar */\n actions: CalendarTextsActions;\n /** Text abbreviation for months in Calendar's header, starting with January */\n months: string[];\n /** Text abbreviation for days in Calendar's header, starting with Sunday */\n weekdaysShort: string[];\n};\n\nconst renderDay = (day: Date, modifiers: DayModifiers): React.ReactNode =>\n modifiers.disabled ? <span className=\"dot\" /> : day.getDate();\n\n/** @internal */\ntype CustomNavbarElementProps = NavbarElementProps & {\n showYearControls?: boolean;\n onMonthChange: (month: Date) => void;\n value?: Date;\n};\n\nconst thisYear = new Date().getFullYear();\nconst years: number[] = [];\n\nfor (let i = thisYear - 10; i <= thisYear + 10; i += 1) {\n years.push(i);\n}\n\nconst Navbar = React.memo(\n ({ onMonthChange, onNextClick, onPreviousClick, value = new Date() }: CustomNavbarElementProps): JSX.Element => {\n const {\n texts: {\n calendar: { actions, months },\n },\n } = useLocalization();\n\n const handleChange = function handleChange(event) {\n const { year, month } = event.target.form;\n onMonthChange(new Date(year.value, month.value));\n };\n\n return (\n <div className=\"mb-2 flex items-center justify-between\">\n <form className=\"inline-flex space-x-1\">\n <select className=\"h-8 px-2\" name=\"month\" onChange={handleChange} value={value.getMonth()}>\n {months.map((month, i) => (\n <option key={month} value={i}>\n {month}\n </option>\n ))}\n </select>\n <select className=\"h-8 px-2\" name=\"year\" onChange={handleChange} value={value.getFullYear()}>\n {years.map(year => (\n <option key={year} value={year}>\n {String(year)}\n </option>\n ))}\n </select>\n </form>\n <div>\n <IconButton\n appearance=\"discrete\"\n icon=\"chevron-left\"\n aria-label={actions.previousMonth}\n onClick={() => onPreviousClick()}\n rounded\n />\n <IconButton\n appearance=\"discrete\"\n icon=\"chevron-right\"\n aria-label={actions.nextMonth}\n onClick={() => onNextClick()}\n rounded\n />\n </div>\n </div>\n );\n }\n);\n\nexport type CalendarProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'value'> & {\n /** Handler called when a day is clicked in calendar */\n onChange: (date: Date, event?: React.MouseEvent<HTMLDivElement>) => void;\n value?: Date;\n};\n\nexport const Calendar = React.forwardRef(function Calendar(props: CalendarProps, ref: React.Ref<ReactDayPicker>) {\n const { onChange: handleChange, value, ...otherProps } = props;\n const { locale, texts } = useLocalization();\n const [visibleMonth, setVisibleMonth] = React.useState(value ?? new Date());\n\n React.useEffect(() => {\n if (visibleMonth !== value) {\n setVisibleMonth(value ?? new Date());\n }\n }, [value]);\n\n const handleDayClick = (date, modifiers, event) => {\n if (modifiers.outside || modifiers.disabled) {\n return;\n }\n\n handleChange(date, event);\n };\n\n const handleCalendarClickToday = (): void => {\n const today = new Date();\n\n // set to midday to avoid UTC offset causing dates to be mismatched server side\n today.setHours(12);\n today.setMinutes(0);\n today.setSeconds(0);\n\n handleChange(today);\n };\n\n const className = cn('flex bg-white text-xs p-4', otherProps.className);\n\n return (\n <div data-taco=\"calendar\">\n <ReactDayPicker\n {...otherProps}\n className={className}\n month={visibleMonth}\n selectedDays={value}\n locale={locale.substring(0, 2)}\n firstDayOfWeek={1}\n months={texts.calendar.months}\n weekdaysShort={texts.calendar.weekdaysShort}\n navbarElement={navProps => <Navbar {...navProps} onMonthChange={setVisibleMonth} value={visibleMonth} />}\n onDayClick={handleDayClick}\n onMonthChange={setVisibleMonth}\n onTodayButtonClick={handleCalendarClickToday}\n captionElement={() => null}\n todayButton={texts.calendar.actions.today}\n showOutsideDays\n renderDay={renderDay}\n numberOfMonths={1}\n ref={ref}\n />\n </div>\n );\n});\n"],"names":["renderDay","day","modifiers","disabled","React","className","getDate","thisYear","Date","getFullYear","years","i","push","Navbar","onMonthChange","onNextClick","onPreviousClick","value","useLocalization","texts","calendar","actions","months","handleChange","event","target","form","year","month","name","onChange","getMonth","map","key","String","IconButton","appearance","icon","previousMonth","onClick","rounded","nextMonth","Calendar","props","ref","otherProps","locale","visibleMonth","setVisibleMonth","handleDayClick","date","outside","handleCalendarClickToday","today","setHours","setMinutes","setSeconds","cn","ReactDayPicker","selectedDays","substring","firstDayOfWeek","weekdaysShort","navbarElement","navProps","onDayClick","onTodayButtonClick","captionElement","todayButton","showOutsideDays","numberOfMonths"],"mappings":";;;;;;;;;AA6BA,IAAMA,SAAS,GAAG,SAAZA,SAAY,CAACC,GAAD,EAAYC,SAAZ;EAAA,OACdA,SAAS,CAACC,QAAV,GAAqBC,aAAA,OAAA;IAAMC,SAAS,EAAC;GAAhB,CAArB,GAAgDJ,GAAG,CAACK,OAAJ,EADlC;AAAA,CAAlB;;AAUA,IAAMC,QAAQ,gBAAG,IAAIC,IAAJ,GAAWC,WAAX,EAAjB;AACA,IAAMC,KAAK,GAAa,EAAxB;;AAEA,KAAK,IAAIC,CAAC,GAAGJ,QAAQ,GAAG,EAAxB,EAA4BI,CAAC,IAAIJ,QAAQ,GAAG,EAA5C,EAAgDI,CAAC,IAAI,CAArD,EAAwD;EACpDD,KAAK,CAACE,IAAN,CAAWD,CAAX;AACH;;AAED,IAAME,MAAM,gBAAGT,IAAA,CACX;MAAGU,qBAAAA;MAAeC,mBAAAA;MAAaC,uBAAAA;wBAAiBC;MAAAA,gCAAQ,IAAIT,IAAJ;;EACpD,uBAIIU,eAAe,EAJnB;+CACIC,KADJ,CAEQC,QAFR;MAEoBC,OAFpB,yBAEoBA,OAFpB;MAE6BC,MAF7B,yBAE6BA,MAF7B;;EAMA,IAAMC,YAAY,GAAG,SAASA,YAAT,CAAsBC,KAAtB;IACjB,yBAAwBA,KAAK,CAACC,MAAN,CAAaC,IAArC;QAAQC,IAAR,sBAAQA,IAAR;QAAcC,KAAd,sBAAcA,KAAd;IACAd,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Y,EAAE1C;IACd6B,MAAM,EAAEA,MAAM,CAACc,SAAP,CAAiB,CAAjB,EAAoB,CAApB;IACRC,cAAc,EAAE;IAChBvC,MAAM,EAAEH,KAAK,CAACC,QAAN,CAAeE;IACvBwC,aAAa,EAAE3C,KAAK,CAACC,QAAN,CAAe0C;IAC9BC,aAAa,EAAE,uBAAAC,QAAQ;MAAA,OAAI5D,aAAA,CAACS,MAAD,oBAAYmD;QAAUlD,aAAa,EAAEkC;QAAiB/B,KAAK,EAAE8B;QAA7D,CAAJ;;IACvBkB,UAAU,EAAEhB;IACZnC,aAAa,EAAEkC;IACfkB,kBAAkB,EAAEd;IACpBe,cAAc,EAAE;MAAA,OAAM,IAAN;;IAChBC,WAAW,EAAEjD,KAAK,CAACC,QAAN,CAAeC,OAAf,CAAuBgC;IACpCgB,eAAe;IACfrE,SAAS,EAAEA;IACXsE,cAAc,EAAE;IAChB1B,GAAG,EAAEA;IAlBT,CADJ,CADJ;AAwBH,CAxDuB;;;;"}
1
+ {"version":3,"file":"Calendar.js","sources":["../../../../src/components/Calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport ReactDayPicker, { NavbarElementProps, Modifier } from 'react-day-picker';\nimport { useLocalization } from '../Provider/Provider';\nimport './Calendar.css';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type CalendarTextsActions = {\n /** Aria-label for previous month action button */\n previousMonth: string;\n /** Aria-label for next month action button */\n nextMonth: string;\n /** Aria-label for previous year action button */\n previousYear: string;\n /** Aria-label for next year action button */\n nextYear: string;\n /** Text displayed within today action button */\n today: string;\n};\n\nexport type CalendarTexts = {\n /** Text and aria-label for action buttons in Calendar */\n actions: CalendarTextsActions;\n /** Text abbreviation for months in Calendar's header, starting with January */\n months: string[];\n /** Text abbreviation for days in Calendar's header, starting with Sunday */\n weekdaysShort: string[];\n};\n\n/** @internal */\ntype CustomNavbarElementProps = NavbarElementProps & {\n showYearControls?: boolean;\n onMonthChange: (month: Date) => void;\n value?: Date;\n};\n\nconst thisYear = new Date().getFullYear();\nconst years: number[] = [];\n\nfor (let i = thisYear - 10; i <= thisYear + 10; i += 1) {\n years.push(i);\n}\n\nconst Navbar = React.memo(\n ({ onMonthChange, onNextClick, onPreviousClick, value = new Date() }: CustomNavbarElementProps): JSX.Element => {\n const {\n texts: {\n calendar: { actions, months },\n },\n } = useLocalization();\n\n const handleChange = function handleChange(event) {\n const { year, month } = event.target.form;\n onMonthChange(new Date(year.value, month.value));\n };\n\n return (\n <div className=\"mb-2 flex items-center justify-between\">\n <form className=\"inline-flex space-x-1\">\n <select className=\"h-8 px-2\" name=\"month\" onChange={handleChange} value={value.getMonth()}>\n {months.map((month, i) => (\n <option key={month} value={i}>\n {month}\n </option>\n ))}\n </select>\n <select className=\"h-8 px-2\" name=\"year\" onChange={handleChange} value={value.getFullYear()}>\n {years.map(year => (\n <option key={year} value={year}>\n {String(year)}\n </option>\n ))}\n </select>\n </form>\n <div>\n <IconButton\n appearance=\"discrete\"\n icon=\"chevron-left\"\n aria-label={actions.previousMonth}\n onClick={() => onPreviousClick()}\n rounded\n />\n <IconButton\n appearance=\"discrete\"\n icon=\"chevron-right\"\n aria-label={actions.nextMonth}\n onClick={() => onNextClick()}\n rounded\n />\n </div>\n </div>\n );\n }\n);\n\nexport type CalendarProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'value'> & {\n /** Handler called when a day is clicked in calendar */\n onChange: (date: Date, event?: React.MouseEvent<HTMLDivElement>) => void;\n value?: Date;\n disabledDays?: Modifier[];\n};\n\nexport const Calendar = React.forwardRef(function Calendar(props: CalendarProps, ref: React.Ref<ReactDayPicker>) {\n const { onChange: handleChange, value, disabledDays, ...otherProps } = props;\n const { locale, texts } = useLocalization();\n const [visibleMonth, setVisibleMonth] = React.useState(value ?? new Date());\n\n React.useEffect(() => {\n if (visibleMonth !== value) {\n setVisibleMonth(value ?? new Date());\n }\n }, [value]);\n\n const handleDayClick = (date, modifiers, event) => {\n if (modifiers.outside || modifiers.disabled) {\n return;\n }\n\n handleChange(date, event);\n };\n\n const handleCalendarClickToday = (): void => {\n const today = new Date();\n\n // set to midday to avoid UTC offset causing dates to be mismatched server side\n today.setHours(12);\n today.setMinutes(0);\n today.setSeconds(0);\n\n handleChange(today);\n };\n\n const className = cn('flex bg-white text-xs p-4', otherProps.className);\n\n return (\n <div data-taco=\"calendar\">\n <ReactDayPicker\n {...otherProps}\n className={className}\n month={visibleMonth}\n selectedDays={value}\n locale={locale.substring(0, 2)}\n firstDayOfWeek={1}\n months={texts.calendar.months}\n weekdaysShort={texts.calendar.weekdaysShort}\n navbarElement={navProps => <Navbar {...navProps} onMonthChange={setVisibleMonth} value={visibleMonth} />}\n onDayClick={handleDayClick}\n onMonthChange={setVisibleMonth}\n onTodayButtonClick={handleCalendarClickToday}\n captionElement={() => null}\n todayButton={texts.calendar.actions.today}\n numberOfMonths={1}\n ref={ref}\n disabledDays={disabledDays}\n />\n </div>\n );\n});\n"],"names":["thisYear","Date","getFullYear","years","i","push","Navbar","React","onMonthChange","onNextClick","onPreviousClick","value","useLocalization","texts","calendar","actions","months","handleChange","event","target","form","year","month","className","name","onChange","getMonth","map","key","String","IconButton","appearance","icon","previousMonth","onClick","rounded","nextMonth","Calendar","props","ref","disabledDays","otherProps","locale","visibleMonth","setVisibleMonth","handleDayClick","date","modifiers","outside","disabled","handleCalendarClickToday","today","setHours","setMinutes","setSeconds","cn","ReactDayPicker","selectedDays","substring","firstDayOfWeek","weekdaysShort","navbarElement","navProps","onDayClick","onTodayButtonClick","captionElement","todayButton","numberOfMonths"],"mappings":";;;;;;;;AAoCA,IAAMA,QAAQ,gBAAG,IAAIC,IAAJ,GAAWC,WAAX,EAAjB;AACA,IAAMC,KAAK,GAAa,EAAxB;;AAEA,KAAK,IAAIC,CAAC,GAAGJ,QAAQ,GAAG,EAAxB,EAA4BI,CAAC,IAAIJ,QAAQ,GAAG,EAA5C,EAAgDI,CAAC,IAAI,CAArD,EAAwD;EACpD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AAO5B,KAAP,CAAZ;GALJ;;EAQA,IAAMgC,wBAAwB,GAAG,SAA3BA,wBAA2B;IAC7B,IAAMC,KAAK,GAAG,IAAIlD,IAAJ,EAAd;;IAGAkD,KAAK,CAACC,QAAN,CAAe,EAAf;IACAD,KAAK,CAACE,UAAN,CAAiB,CAAjB;IACAF,KAAK,CAACG,UAAN,CAAiB,CAAjB;IAEArC,YAAY,CAACkC,KAAD,CAAZ;GARJ;;EAWA,IAAM5B,SAAS,GAAGgC,EAAE,CAAC,2BAAD,EAA8Bd,UAAU,CAAClB,SAAzC,CAApB;EAEA,OACIhB,aAAA,MAAA;iBAAe;GAAf,EACIA,aAAA,CAACiD,cAAD,oBACQf;IACJlB,SAAS,EAAEA;IACXD,KAAK,EAAEqB;IACPc,YAAY,EAAE9C;IACd+B,MAAM,EAAEA,MAAM,CAACgB,SAAP,CAAiB,CAAjB,EAAoB,CAApB;IACRC,cAAc,EAAE;IAChB3C,MAAM,EAAEH,KAAK,CAACC,QAAN,CAAeE;IACvB4C,aAAa,EAAE/C,KAAK,CAACC,QAAN,CAAe8C;IAC9BC,aAAa,EAAE,uBAAAC,QAAQ;MAAA,OAAIvD,aAAA,CAACD,MAAD,oBAAYwD;QAAUtD,aAAa,EAAEoC;QAAiBjC,KAAK,EAAEgC;QAA7D,CAAJ;;IACvBoB,UAAU,EAAElB;IACZrC,aAAa,EAAEoC;IACfoB,kBAAkB,EAAEd;IACpBe,cAAc,EAAE;MAAA,OAAM,IAAN;;IAChBC,WAAW,EAAErD,KAAK,CAACC,QAAN,CAAeC,OAAf,CAAuBoC;IACpCgB,cAAc,EAAE;IAChB5B,GAAG,EAAEA;IACLC,YAAY,EAAEA;IAjBlB,CADJ,CADJ;AAuBH,CAvDuB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Icon } from '../Icon/Icon';\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {\n /* Increases visual prominenance of the checkbox */\n highlighted?: boolean;\n /**\n * Indeterminate state should only be used with sub-checkboxes. The indeterminate state is shown if not all\n * sub-checkboxes are selected. This only affects the style, changing the icon in the checkbox.\n */\n indeterminate?: boolean;\n /* Whether the checkbox is in an invalid state */\n invalid?: boolean;\n /** Label for the checkbox */\n label?: React.ReactNode;\n /* Whether user input is required */\n required?: boolean;\n};\n\ninterface UncontrolledCheckboxProps extends CheckboxBaseProps {\n checked?: never;\n onChange?: never;\n /* The default checked state (uncontrolled) */\n defaultChecked?: boolean;\n}\n\ninterface ControlledCheckboxProps extends CheckboxBaseProps {\n defaultChecked?: never;\n /* The current checked state (controlled) */\n checked: boolean;\n /* Handler called when the checked state changes */\n onChange: (checked: boolean) => void;\n}\n\nexport type CheckboxProps = UncontrolledCheckboxProps | ControlledCheckboxProps;\n\nexport const Checkbox = React.forwardRef(function Checkbox(props: CheckboxProps, ref: React.Ref<HTMLButtonElement>) {\n const { checked, highlighted, indeterminate, invalid, label, onChange, ...otherProps } = props;\n\n const className = cn(\n 'bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]\n props.className,\n {\n 'border-grey-dark text-blue hover:text-blue-light focus:border-blue focus:hover:border-blue-light':\n !props.disabled && !invalid,\n 'border-grey text-blue-light cursor-not-allowed': props.disabled,\n 'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,\n 'border-red text-red hover:text-red-light hover:border-red-light focus:border-red focus:hover:border-red-light':\n invalid && !props.disabled,\n }\n );\n\n let handleChange: ((checked: CheckedState) => void) | undefined;\n\n if (onChange) {\n handleChange = (checked: CheckedState) => onChange(checked === 'indeterminate' ? false : checked);\n }\n\n const element = (\n <CheckboxPrimitive.Root\n {...otherProps}\n data-taco=\"checkbox\"\n checked={indeterminate ? 'indeterminate' : checked}\n className={className}\n onCheckedChange={handleChange}\n ref={ref}\n >\n <CheckboxPrimitive.Indicator className=\"flex h-full w-full\">\n <Icon name={indeterminate ? 'line' : 'tick'} className=\"!h-full !w-full\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n\n if (label) {\n const labelClassName = cn(\n 'flex items-center cursor-pointer gap-2',\n {\n 'cursor-not-allowed text-grey-dark': props.disabled,\n },\n props.className\n );\n\n return (\n <label className={labelClassName}>\n {element}\n {label}\n </label>\n );\n }\n\n return element;\n});\n"],"names":["Checkbox","React","props","ref","checked","highlighted","indeterminate","invalid","label","onChange","otherProps","className","cn","disabled","handleChange","element","CheckboxPrimitive","onCheckedChange","Icon","name","labelClassName"],"mappings":";;;;;;;IAwCaA,QAAQ,gBAAGC,UAAA,CAAiB,SAASD,QAAT,CAAkBE,KAAlB,EAAwCC,GAAxC;EACrC,IAAQC,OAAR,GAAyFF,KAAzF,CAAQE,OAAR;MAAiBC,WAAjB,GAAyFH,KAAzF,CAAiBG,WAAjB;MAA8BC,aAA9B,GAAyFJ,KAAzF,CAA8BI,aAA9B;MAA6CC,OAA7C,GAAyFL,KAAzF,CAA6CK,OAA7C;MAAsDC,KAAtD,GAAyFN,KAAzF,CAAsDM,KAAtD;MAA6DC,QAA7D,GAAyFP,KAAzF,CAA6DO,QAA7D;MAA0EC,UAA1E,iCAAyFR,KAAzF;;EAEA,IAAMS,SAAS,GAAGC,EAAE,CAChB,6FADgB;EAEhBV,KAAK,CAACS,SAFU,EAGhB;IACI,oGACI,CAACT,KAAK,CAACW,QAAP,IAAmB,CAACN,OAF5B;IAGI,kDAAkDL,KAAK,CAACW,QAH5D;IAII,gEAAgER,WAJpE;IAKI,iHACIE,OAAO,IAAI,CAACL,KAAK,CAACW;GATV,CAApB;EAaA,IAAIC,YAAJ;;EAEA,IAAIL,QAAJ,EAAc;IACVK,YAAY,GAAG,sBAACV,OAAD;MAAA,OAA2BK,QAAQ,CAACL,OAAO,KAAK,eAAZ,GAA8B,KAA9B,GAAsCA,OAAvC,CAAnC;KAAf;;;EAGJ,IAAMW,OAAO,GACTd,aAAA,CAACe,IAAD,oBACQN;iBACM;IACVN,OAAO,EAAEE,aAAa,GAAG,eAAH,GAAqBF;IAC3CO,SAAS,EAAEA;IACXM,eAAe,EAAEH;IACjBX,GAAG,EAAEA;IANT,EAQIF,aAAA,CAACe,SAAD;IAA6BL,SAAS,EAAC;GAAvC,EACIV,aAAA,CAACiB,IAAD;IAAMC,IAAI,EAAEb,aAAa,GAAG,MAAH,GAAY;IAAQK,SAAS,EAAC;GAAvD,CADJ,CARJ,CADJ;;EAeA,IAAIH,KAAJ,EAAW;IACP,IAAMY,cAAc,GAAGR,EAAE,CACrB,wCADqB,EAErB;MACI,qCAAqCV,KAAK,CAACW;KAH1B,EAKrBX,KAAK,CAACS,SALe,CAAzB;IAQA,OACIV,aAAA,QAAA;MAAOU,SAAS,EAAES;KAAlB,EACKL,OADL,EAEKP,KAFL,CADJ;;;EAQJ,OAAOO,OAAP;AACH,CAvDuB;;;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Icon } from '../Icon/Icon';\n\ntype CheckedState = boolean | 'indeterminate';\n\ntype CheckboxBaseProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onChange'> & {\n /* Increases visual prominenance of the checkbox */\n highlighted?: boolean;\n /**\n * Indeterminate state should only be used with sub-checkboxes. The indeterminate state is shown if not all\n * sub-checkboxes are selected. This only affects the style, changing the icon in the checkbox.\n */\n indeterminate?: boolean;\n /* Whether the checkbox is in an invalid state */\n invalid?: boolean;\n /** Label for the checkbox */\n label?: React.ReactNode;\n /* Whether user input is required */\n required?: boolean;\n};\n\ninterface UncontrolledCheckboxProps extends CheckboxBaseProps {\n checked?: never;\n onChange?: never;\n /* The default checked state (uncontrolled) */\n defaultChecked?: boolean;\n}\n\ninterface ControlledCheckboxProps extends CheckboxBaseProps {\n defaultChecked?: never;\n /* The current checked state (controlled) */\n checked: boolean;\n /* Handler called when the checked state changes */\n onChange: (checked: boolean) => void;\n}\n\nexport type CheckboxProps = UncontrolledCheckboxProps | ControlledCheckboxProps;\n\nexport const Checkbox = React.forwardRef(function Checkbox(props: CheckboxProps, ref: React.Ref<HTMLButtonElement>) {\n const { checked, highlighted, indeterminate, invalid, label, onChange, ...otherProps } = props;\n\n const className = cn(\n 'bg-white h-5 w-5 border rounded text-sm flex-shrink-0 self-start mt-[0.1rem] focus:yt-focus', //hover:shadow-[0_0_0_1px_rgba(235,235,235,1)]\n props.className,\n {\n 'border-grey-dark text-blue hover:text-blue-light focus:border-blue focus:hover:border-blue-light':\n !props.disabled && !invalid,\n 'border-grey text-blue-light cursor-not-allowed': props.disabled,\n 'bg-[rgba(255,255,0,0.2)] disabled:bg-[rgba(255,255,0,0.075)]': highlighted,\n 'border-red text-red hover:text-red-light hover:border-red-light focus:border-red focus:hover:border-red-light':\n invalid && !props.disabled,\n }\n );\n\n let handleChange: ((checked: CheckedState) => void) | undefined;\n\n if (onChange) {\n handleChange = (checked: CheckedState) => onChange(checked === 'indeterminate' ? false : checked);\n }\n\n const element = (\n <CheckboxPrimitive.Root\n {...otherProps}\n data-taco=\"checkbox\"\n checked={indeterminate ? 'indeterminate' : checked}\n className={className}\n onCheckedChange={handleChange}\n ref={ref}>\n <CheckboxPrimitive.Indicator className=\"flex h-full w-full\">\n <Icon name={indeterminate ? 'line' : 'tick'} className=\"!h-full !w-full\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n\n if (label) {\n const labelClassName = cn(\n 'flex items-center cursor-pointer gap-2',\n {\n 'cursor-not-allowed text-grey-dark': props.disabled,\n },\n props.className\n );\n\n return (\n <label className={labelClassName}>\n {element}\n {label}\n </label>\n );\n }\n\n return element;\n});\n"],"names":["Checkbox","React","props","ref","checked","highlighted","indeterminate","invalid","label","onChange","otherProps","className","cn","disabled","handleChange","element","CheckboxPrimitive","onCheckedChange","Icon","name","labelClassName"],"mappings":";;;;;;;IAwCaA,QAAQ,gBAAGC,UAAA,CAAiB,SAASD,QAAT,CAAkBE,KAAlB,EAAwCC,GAAxC;EACrC,IAAQC,OAAR,GAAyFF,KAAzF,CAAQE,OAAR;MAAiBC,WAAjB,GAAyFH,KAAzF,CAAiBG,WAAjB;MAA8BC,aAA9B,GAAyFJ,KAAzF,CAA8BI,aAA9B;MAA6CC,OAA7C,GAAyFL,KAAzF,CAA6CK,OAA7C;MAAsDC,KAAtD,GAAyFN,KAAzF,CAAsDM,KAAtD;MAA6DC,QAA7D,GAAyFP,KAAzF,CAA6DO,QAA7D;MAA0EC,UAA1E,iCAAyFR,KAAzF;;EAEA,IAAMS,SAAS,GAAGC,EAAE,CAChB,6FADgB;EAEhBV,KAAK,CAACS,SAFU,EAGhB;IACI,oGACI,CAACT,KAAK,CAACW,QAAP,IAAmB,CAACN,OAF5B;IAGI,kDAAkDL,KAAK,CAACW,QAH5D;IAII,gEAAgER,WAJpE;IAKI,iHACIE,OAAO,IAAI,CAACL,KAAK,CAACW;GATV,CAApB;EAaA,IAAIC,YAAJ;;EAEA,IAAIL,QAAJ,EAAc;IACVK,YAAY,GAAG,sBAACV,OAAD;MAAA,OAA2BK,QAAQ,CAACL,OAAO,KAAK,eAAZ,GAA8B,KAA9B,GAAsCA,OAAvC,CAAnC;KAAf;;;EAGJ,IAAMW,OAAO,GACTd,aAAA,CAACe,IAAD,oBACQN;iBACM;IACVN,OAAO,EAAEE,aAAa,GAAG,eAAH,GAAqBF;IAC3CO,SAAS,EAAEA;IACXM,eAAe,EAAEH;IACjBX,GAAG,EAAEA;IANT,EAOIF,aAAA,CAACe,SAAD;IAA6BL,SAAS,E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