@wonderflow/react-components 6.0.0 → 8.0.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 (156) hide show
  1. package/core/utils/media.css +5 -5
  2. package/dist/components/autocomplete/autocomplete-option.js +1 -1
  3. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  4. package/dist/components/autocomplete/autocomplete.js +6 -6
  5. package/dist/components/avatar/avatar.js +1 -1
  6. package/dist/components/button/button.d.ts.map +1 -1
  7. package/dist/components/button/button.js +3 -3
  8. package/dist/components/button/button.module.css +1 -1
  9. package/dist/components/card/card.js +1 -1
  10. package/dist/components/card/card.module.css +1 -1
  11. package/dist/components/chip/chip.js +1 -1
  12. package/dist/components/chip/chip.module.css +1 -1
  13. package/dist/components/circular-progress/circular-progress.js +3 -3
  14. package/dist/components/clamp-text/clamp-text.js +1 -1
  15. package/dist/components/container/container.d.ts +1 -1
  16. package/dist/components/container/container.d.ts.map +1 -1
  17. package/dist/components/container/container.js +1 -1
  18. package/dist/components/container/container.module.css +1 -1
  19. package/dist/components/datetime/datetime.js +1 -1
  20. package/dist/components/disclosure/disclosure.d.ts.map +1 -1
  21. package/dist/components/disclosure/disclosure.js +4 -4
  22. package/dist/components/disclosure/disclosure.module.css +1 -1
  23. package/dist/components/drawer/drawer.d.ts.map +1 -1
  24. package/dist/components/drawer/drawer.js +2 -2
  25. package/dist/components/elevator/elevator.js +1 -1
  26. package/dist/components/grid/grid.js +4 -4
  27. package/dist/components/grid/grid.module.css +1 -1
  28. package/dist/components/grid/item/grid-item.js +1 -1
  29. package/dist/components/icon/icon.d.ts +1 -1
  30. package/dist/components/icon/icon.js +2 -2
  31. package/dist/components/icon-button/icon-button.js +1 -1
  32. package/dist/components/index.d.ts +1 -1
  33. package/dist/components/index.d.ts.map +1 -1
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/info-state/info-state.js +1 -1
  36. package/dist/components/input-group/input-group.js +4 -4
  37. package/dist/components/linear-progress/linear-progress.js +2 -2
  38. package/dist/components/list/index.d.ts +1 -0
  39. package/dist/components/list/index.d.ts.map +1 -1
  40. package/dist/components/list/list-item.d.ts +28 -0
  41. package/dist/components/list/list-item.d.ts.map +1 -0
  42. package/dist/components/list/list-item.js +31 -0
  43. package/dist/components/list/list.d.ts +6 -11
  44. package/dist/components/list/list.d.ts.map +1 -1
  45. package/dist/components/list/list.js +9 -19
  46. package/dist/components/list/list.module.css +1 -1
  47. package/dist/components/masonry/masonry.js +1 -1
  48. package/dist/components/menu/menu-item/menu-item-checkbox.js +1 -1
  49. package/dist/components/menu/menu-item/menu-item.js +3 -3
  50. package/dist/components/menu/menu.d.ts +1 -1
  51. package/dist/components/menu/menu.js +1 -1
  52. package/dist/components/modal/content/modal-content.js +1 -1
  53. package/dist/components/modal/modal.d.ts.map +1 -1
  54. package/dist/components/modal/modal.js +2 -2
  55. package/dist/components/overlay-container/overlay-container.d.ts.map +1 -1
  56. package/dist/components/overlay-container/overlay-container.js +2 -2
  57. package/dist/components/overlay-container/overlay-context.js +1 -1
  58. package/dist/components/pagination/pagination.js +1 -1
  59. package/dist/components/popover/index.d.ts +4 -0
  60. package/dist/components/popover/index.d.ts.map +1 -0
  61. package/dist/components/popover/index.js +2 -0
  62. package/dist/components/popover/popover.d.ts +95 -0
  63. package/dist/components/popover/popover.d.ts.map +1 -0
  64. package/dist/components/popover/popover.js +93 -0
  65. package/dist/components/popover/popover.module.css +1 -0
  66. package/dist/components/prose/prose.js +1 -1
  67. package/dist/components/select/select.js +1 -1
  68. package/dist/components/select/select.module.css +1 -1
  69. package/dist/components/selection-controls/checkbox.d.ts.map +1 -1
  70. package/dist/components/selection-controls/checkbox.js +2 -1
  71. package/dist/components/selection-controls/radio.d.ts.map +1 -1
  72. package/dist/components/selection-controls/radio.js +2 -1
  73. package/dist/components/selection-controls/selection-controls.module.css +1 -1
  74. package/dist/components/selection-controls/toggle.js +1 -1
  75. package/dist/components/separator/separator.js +1 -1
  76. package/dist/components/skeleton/skeleton.js +3 -3
  77. package/dist/components/slider/slider.d.ts.map +1 -1
  78. package/dist/components/slider/slider.js +2 -2
  79. package/dist/components/slider/slider.module.css +1 -1
  80. package/dist/components/snackbar/snackbar.js +1 -1
  81. package/dist/components/spinner/spinner.d.ts.map +1 -1
  82. package/dist/components/spinner/spinner.js +6 -6
  83. package/dist/components/split-button/split-button.d.ts +2 -2
  84. package/dist/components/split-button/split-button.d.ts.map +1 -1
  85. package/dist/components/split-button/split-button.js +2 -2
  86. package/dist/components/stack/stack.js +1 -1
  87. package/dist/components/star-meter/star-meter.d.ts.map +1 -1
  88. package/dist/components/star-meter/star-meter.js +10 -10
  89. package/dist/components/star-meter/star-meter.module.css +1 -1
  90. package/dist/components/tab/tab.d.ts +27 -26
  91. package/dist/components/tab/tab.d.ts.map +1 -1
  92. package/dist/components/tab/tab.js +15 -32
  93. package/dist/components/tab/tab.module.css +1 -1
  94. package/dist/components/tab/tabs-panel.d.ts +10 -0
  95. package/dist/components/tab/tabs-panel.d.ts.map +1 -0
  96. package/dist/components/tab/tabs-panel.js +4 -0
  97. package/dist/components/table/table-cell/table-cell.d.ts +0 -4
  98. package/dist/components/table/table-cell/table-cell.d.ts.map +1 -1
  99. package/dist/components/table/table-cell/table-cell.js +10 -21
  100. package/dist/components/table/table-cell/table-cell.module.css +1 -1
  101. package/dist/components/table/table-checkbox/table-checkbox.js +1 -1
  102. package/dist/components/table/table-controls/toggle-columns.d.ts +4 -4
  103. package/dist/components/table/table-controls/toggle-columns.d.ts.map +1 -1
  104. package/dist/components/table/table-controls/toggle-columns.js +5 -5
  105. package/dist/components/table/table-expand/table-expand.js +1 -1
  106. package/dist/components/table/table-header/table-header.d.ts +1 -1
  107. package/dist/components/table/table-header/table-header.d.ts.map +1 -1
  108. package/dist/components/table/table-header/table-header.js +2 -2
  109. package/dist/components/table/table-pagination/table-pagination.d.ts +1 -1
  110. package/dist/components/table/table-pagination/table-pagination.d.ts.map +1 -1
  111. package/dist/components/table/table-pagination/table-pagination.js +5 -3
  112. package/dist/components/table/table-row/table-row.d.ts +8 -3
  113. package/dist/components/table/table-row/table-row.d.ts.map +1 -1
  114. package/dist/components/table/table-row/table-row.js +12 -3
  115. package/dist/components/table/table-row/table-row.module.css +1 -1
  116. package/dist/components/table/table.d.ts +44 -54
  117. package/dist/components/table/table.d.ts.map +1 -1
  118. package/dist/components/table/table.js +89 -75
  119. package/dist/components/table/types.d.ts +11 -7
  120. package/dist/components/table/types.d.ts.map +1 -1
  121. package/dist/components/text/text.js +3 -3
  122. package/dist/components/text/text.module.css +1 -1
  123. package/dist/components/textfield/base-field/base-field.js +1 -1
  124. package/dist/components/textfield/base-field/base-field.module.css +1 -1
  125. package/dist/components/textfield/textfield.js +3 -3
  126. package/dist/components/title/title.js +3 -3
  127. package/dist/components/title/title.module.css +1 -1
  128. package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
  129. package/dist/components/toggle-button/toggle-button.js +5 -5
  130. package/dist/components/toggle-button/toggle-button.module.css +1 -1
  131. package/dist/components/tooltip/tooltip.d.ts +1 -1
  132. package/dist/components/tooltip/tooltip.js +2 -2
  133. package/dist/components/tooltip/tooltip.module.css +1 -1
  134. package/package.json +11 -11
  135. package/dist/components/dropdown/dropdown.d.ts +0 -87
  136. package/dist/components/dropdown/dropdown.d.ts.map +0 -1
  137. package/dist/components/dropdown/dropdown.js +0 -69
  138. package/dist/components/dropdown/dropdown.module.css +0 -1
  139. package/dist/components/dropdown/index.d.ts +0 -3
  140. package/dist/components/dropdown/index.d.ts.map +0 -1
  141. package/dist/components/dropdown/index.js +0 -1
  142. package/dist/components/tab/primitive-tab.d.ts +0 -12
  143. package/dist/components/tab/primitive-tab.d.ts.map +0 -1
  144. package/dist/components/tab/primitive-tab.js +0 -51
  145. package/dist/components/tab/tab-item.d.ts +0 -23
  146. package/dist/components/tab/tab-item.d.ts.map +0 -1
  147. package/dist/components/tab/tab-item.js +0 -23
  148. package/dist/components/tab/tab-list.d.ts +0 -8
  149. package/dist/components/tab/tab-list.d.ts.map +0 -1
  150. package/dist/components/tab/tab-list.js +0 -11
  151. package/dist/components/tab/tab-panel.d.ts +0 -35
  152. package/dist/components/tab/tab-panel.d.ts.map +0 -1
  153. package/dist/components/tab/tab-panel.js +0 -16
  154. package/dist/components/tab/use-constant.d.ts +0 -2
  155. package/dist/components/tab/use-constant.d.ts.map +0 -1
  156. package/dist/components/tab/use-constant.js +0 -8
@@ -1,23 +1,13 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Children, forwardRef, useMemo } from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Children, cloneElement, forwardRef, isValidElement, useMemo } from 'react';
3
3
  import styles from './list.module.css';
4
4
  import clsx from 'clsx';
5
- import { Text, Stack, Icon } from '../..';
6
- export const List = forwardRef(({ as: Wrapper = 'ul', children, marker = 'circle', dimension = 'regular', className, markerColor, hideMarker = false, ...otherProps }, forwardedRef) => {
7
- const sizes = {
8
- small: {
9
- text: 16,
10
- icon: 16
11
- },
12
- regular: {
13
- text: 18,
14
- icon: 16
15
- },
16
- big: {
17
- text: 22,
18
- icon: 24
19
- }
20
- };
5
+ import { ListItem } from './list-item';
6
+ export const List = forwardRef(({ as: Wrapper = 'ul', children, dimension = 'regular', className, hideMarker = false, ...otherProps }, forwardedRef) => {
21
7
  const isUnordered = useMemo(() => Wrapper === 'ul', [Wrapper]);
22
- return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.List, className), "data-list-size": dimension, "data-list-ordered": !isUnordered, "data-list-no-marker": hideMarker, ...otherProps, children: Children.map(children, (child) => (_jsxs(Stack, { as: "li", direction: "row", hAlign: "start", vAlign: "start", fill: false, children: [(isUnordered && !hideMarker) && (_jsx(Icon, { source: marker, className: styles.Marker, fill: markerColor, "data-list-default-marker": marker === 'circle', weight: marker === 'circle' ? 'solid' : undefined, dimension: marker !== 'circle' ? sizes[dimension].icon : 16 }, void 0)), _jsx(Text, { as: "span", size: sizes[dimension].text, children: child.props.children }, void 0)] }, void 0))) }, void 0));
8
+ return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.List, className), "data-list-size": dimension, "data-list-ordered": !isUnordered, "data-list-no-marker": hideMarker, ...otherProps, children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
9
+ hideMarker: !isUnordered && !hideMarker,
10
+ dimension
11
+ })) }));
23
12
  });
13
+ List.Li = ListItem;
@@ -1 +1 @@
1
- .List{--marker-size:0.89rem;--marker-gap:0.44rem}.List li{gap:var(--marker-gap)}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-ordered=true] li::marker{color:var(--dimmed-5)}.List[data-list-size=small]{--marker-size:0.77rem;--marker-gap:0.44rem}.List[data-list-size=big]{--marker-size:1.11rem;--marker-gap:0.89rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.Marker[data-list-default-marker=true]{transform:scale(.7)}.List[data-list-size=big] .Marker,.Marker[data-list-default-marker=true]{margin-block-start:calc(var(--marker-size)/3)}
1
+ .List{--marker-size:0.89rem;--marker-gap:0.44rem}.List[data-list-ordered=false]{list-style:none;padding:0}.List[data-list-size=small]{--marker-size:0.77rem;--marker-gap:0.44rem}.List[data-list-size=big]{--marker-size:1.11rem;--marker-gap:0.89rem}.List[data-list-no-marker=true]{--marker-size:0;--marker-gap:0;list-style:none;padding:0}.ListItem.ListItem{gap:var(--marker-gap)}[data-list-ordered=true] .ListItem.ListItem{display:list-item}[data-list-ordered=true] .ListItem.ListItem::marker{color:var(--dimmed-5)}.Marker{block-size:var(--marker-size);flex-shrink:0;inline-size:var(--marker-size);margin-block-start:calc(var(--marker-size)/2.5)}.Marker[data-list-default-marker=true]{transform:scale(.7)}.List[data-list-size=big] .Marker,.Marker[data-list-default-marker=true]{margin-block-start:calc(var(--marker-size)/3)}
@@ -22,5 +22,5 @@ export const Masonry = ({ className, children, columns = 3, gutter = 16, style,
22
22
  }), {});
23
23
  return (_jsx(MasonryLayout, { role: "list", className: clsx(styles.Masonry, className), columnClassName: styles.Column, breakpointCols: typeof columns === 'number' ? columns : computedColumns, style: { ...dynamicStyle, ...style }, ...otherProps, children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
24
24
  role: 'listitem'
25
- })) }, void 0));
25
+ })) }));
26
26
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import { MenuItem } from '../../..';
4
- export const MenuItemCheckbox = forwardRef(({ children, checked, ...otherProps }, forwardedRef) => (_jsx(MenuItem, { role: "menuitemcheckbox", "aria-checked": checked, ref: forwardedRef, ...otherProps, children: children }, void 0)));
4
+ export const MenuItemCheckbox = forwardRef(({ children, checked, ...otherProps }, forwardedRef) => (_jsx(MenuItem, { role: "menuitemcheckbox", "aria-checked": checked, ref: forwardedRef, ...otherProps, children: children })));
5
5
  MenuItemCheckbox.displayName = 'Menu.ItemCheckbox';
@@ -15,9 +15,9 @@ export const MenuItem = forwardRef(({ className, children, onClick, icon, dimens
15
15
  onClick(e);
16
16
  }
17
17
  }, [handleClick, onClick]);
18
- const InnerContent = useMemo(() => (_jsxs(Stack, { direction: isIconRight ? 'row-reverse' : 'row', as: "span", fill: false, className: styles.ItemContent, hAlign: isIconRight ? 'space-between' : 'start', vAlign: "center", columnGap: 8, hPadding: 16, vPadding: 8, "data-menu-item-icon-right": isIconRight, "data-menu-item-has-icon": Boolean(icon), "data-menu-item-padding": padding, style: { inlineSize: '100%' }, children: [icon && (_jsx(Icon, { className: styles.IconClass, source: icon, dimension: dimension === 'small' ? 12 : 16 }, void 0)), _jsxs(Stack, { className: styles.DecorationContent, columnGap: 16, fill: false, direction: "row", hAlign: "space-between", children: [children, decoration] }, void 0)] }, void 0)), [children, dimension, icon, isIconRight, decoration, padding]);
18
+ const InnerContent = useMemo(() => (_jsxs(Stack, { direction: isIconRight ? 'row-reverse' : 'row', as: "span", fill: false, className: styles.ItemContent, hAlign: isIconRight ? 'space-between' : 'start', vAlign: "center", columnGap: 8, hPadding: 16, vPadding: 8, "data-menu-item-icon-right": isIconRight, "data-menu-item-has-icon": Boolean(icon), "data-menu-item-padding": padding, style: { inlineSize: '100%' }, children: [icon && (_jsx(Icon, { className: styles.IconClass, source: icon, dimension: dimension === 'small' ? 12 : 16 })), _jsxs(Stack, { className: styles.DecorationContent, columnGap: 16, fill: false, direction: "row", hAlign: "space-between", children: [children, decoration] })] })), [children, dimension, icon, isIconRight, decoration, padding]);
19
19
  return (_jsx(Wrapper, { autoFocus: autoFocus, ref: itemRef, role: "menuitem", className: clsx(styles.MenuItem, className), onClick: disabled ? undefined : triggerClick, onKeyDown: disabled ? undefined : handleKeyDown, tabIndex: tabIndex, "aria-disabled": disabled, type: Wrapper === 'button' ? 'button' : undefined, "data-menu-item-dimension": dimension, ...otherProps, children: description
20
- ? (_jsx(Tooltip, { fill: true, open: focused, placement: "right-start", interactive: true, trigger: InnerContent, children: description }, void 0))
21
- : InnerContent }, void 0));
20
+ ? (_jsx(Tooltip, { fill: true, open: focused, placement: "right-start", interactive: true, trigger: InnerContent, children: description }))
21
+ : InnerContent }));
22
22
  });
23
23
  MenuItem.displayName = 'Menu.Item';
@@ -4,7 +4,7 @@ import { MenuItemCheckbox, MenuItemCheckboxProps } from './menu-item/menu-item-c
4
4
  import { Polymorphic } from '../..';
5
5
  export declare type MenuProps = HTMLAttributes<HTMLUListElement> & {
6
6
  /**
7
- * The items of the dropdown menu.
7
+ * The items of the menu.
8
8
  */
9
9
  children: ReactNode;
10
10
  };
@@ -8,7 +8,7 @@ import styles from './menu.module.css';
8
8
  import clsx from 'clsx';
9
9
  export const Menu = forwardRef(({ className, children, ...otherProps }, forwardedRef) => {
10
10
  const renderedChildren = Children.toArray(children).filter(Boolean);
11
- return (_jsx(Elevator, { resting: 2, children: _jsx(Stack, { as: "ul", ref: forwardedRef, className: clsx(styles.Menu, className), vPadding: 8, role: "menu", ...otherProps, children: _jsx(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true }, children: Children.map(renderedChildren, (child) => (_jsx(Stack, { as: "li", role: "none", vPadding: child.type?.displayName === 'Separator' ? 8 : undefined, children: child }, void 0))) }, void 0) }, void 0) }, void 0));
11
+ return (_jsx(Elevator, { resting: 2, children: _jsx(Stack, { as: "ul", ref: forwardedRef, className: clsx(styles.Menu, className), vPadding: 8, role: "menu", ...otherProps, children: _jsx(RovingTabIndexProvider, { options: { direction: 'vertical', loopAround: true }, children: Children.map(renderedChildren, (child) => (_jsx(Stack, { as: "li", role: "none", vPadding: child.type?.displayName === 'Separator' ? 8 : undefined, children: child }))) }) }) }));
12
12
  });
13
13
  Menu.displayName = 'Menu';
14
14
  Menu.Item = MenuItem;
@@ -6,6 +6,6 @@ import styles from './modal-content.module.css';
6
6
  import { Title, Elevator, IconButton, Stack, useOverlayContext } from '../../..';
7
7
  export const ModalContent = forwardRef(({ children, className, title, theme = 'light', ...otherProps }, forwardedRef) => {
8
8
  const { onClose, titleId } = useOverlayContext();
9
- return (_jsx(Elevator, { resting: 4, children: _jsxs("div", { className: clsx(styles.Content, className), ref: forwardedRef, "data-theme": theme, ...otherProps, children: [_jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, children: [_jsx(Title, { responsive: false, level: "5", id: titleId, children: title }, void 0), onClose && _jsx(IconButton, { onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" }, void 0)] }, void 0), _jsx(AutoFocusInside, { children: children }, void 0)] }, void 0) }, void 0));
9
+ return (_jsx(Elevator, { resting: 4, children: _jsxs("div", { className: clsx(styles.Content, className), ref: forwardedRef, "data-theme": theme, ...otherProps, children: [_jsxs(Stack, { vAlign: "center", fill: false, hAlign: "space-between", direction: "row", className: styles.Header, children: [_jsx(Title, { responsive: false, level: "5", id: titleId, children: title }), onClose && _jsx(IconButton, { onClick: onClose, className: styles.CloseButton, icon: "xmark", kind: "flat" })] }), _jsx(AutoFocusInside, { children: children })] }) }));
10
10
  });
11
11
  ModalContent.displayName = 'Modal.Content';
@@ -1 +1 @@
1
- {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAIrD,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAIzE,oBAAY,UAAU,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG;IAC3D;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAA;AAED,aAAK,cAAc,GAAG,KAAK,CAAC,yBAAyB,CAAC,UAAU,CAAC,GAAG;IAClE,OAAO,EAAE,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;CAC7D,CAAA;AAqBD,eAAO,MAAM,KAAK,gBAiCE,CAAA"}
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAIrD,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAIzE,oBAAY,UAAU,GAAG,iBAAiB,CAAC,cAAc,CAAC,GAAG;IAC3D;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAA;AAED,aAAK,cAAc,GAAG,KAAK,CAAC,yBAAyB,CAAC,UAAU,CAAC,GAAG;IAClE,OAAO,EAAE,KAAK,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;CAC7D,CAAA;AAqBD,eAAO,MAAM,KAAK,gBAmCE,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
- import { motion } from 'framer-motion';
3
+ import { domMax, LazyMotion, m } from 'framer-motion';
4
4
  import clsx from 'clsx';
5
5
  import { FocusOn } from 'react-focus-on';
6
6
  import { ModalContent } from './content/modal-content';
@@ -26,7 +26,7 @@ const ModalAnimation = {
26
26
  };
27
27
  export const Modal = forwardRef(({ children, className, closeOnClickOutside = true, ...otherProps }, forwardedRef) => {
28
28
  const { titleId, onClose } = useOverlayContext();
29
- return (_jsx("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(motion.div, { variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: children }, void 0) }, void 0) }, void 0));
29
+ return (_jsx("div", { role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, className: clsx(styles.Modal, className), ref: forwardedRef, ...otherProps, children: _jsx(FocusOn, { onClickOutside: closeOnClickOutside ? onClose : undefined, onEscapeKey: onClose, children: _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { variants: ModalAnimation, initial: "hidden", animate: "visible", exit: "hidden", className: styles.Container, children: children }) }) }) }));
30
30
  });
31
31
  Modal.displayName = 'Modal';
32
32
  Modal.Content = ModalContent;
@@ -1 +1 @@
1
- {"version":3,"file":"overlay-container.d.ts","sourceRoot":"","sources":["../../../src/components/overlay-container/overlay-container.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAM5C,oBAAY,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA4C5D,CAAA"}
1
+ {"version":3,"file":"overlay-container.d.ts","sourceRoot":"","sources":["../../../src/components/overlay-container/overlay-container.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAM5C,oBAAY,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IACzC;;OAEG;IACH,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8C5D,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { AnimatePresence, motion } from 'framer-motion';
2
+ import { domMax, LazyMotion, m, AnimatePresence } from 'framer-motion';
3
3
  import { useEffect } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { useUIDSeed } from 'react-uid';
@@ -12,6 +12,6 @@ export const OverlayContainer = ({ children, root = document.body, overlayColor
12
12
  throw new Error('An OverlayContainer must not be inside another container. Please change the root prop.');
13
13
  }
14
14
  }, [root]);
15
- const content = (_jsx(OverlayProvider, { onClose: onClose, children: _jsx(AnimatePresence, { exitBeforeEnter: true, children: children && (_jsxs("div", { "data-overlay-container": true, "data-overlay-container-obfuscate": obfuscate, className: styles.OverlayContainer, style: { zIndex: index }, children: [obfuscate && (_jsx(motion.span, { className: styles.Backdrop, "data-overlay-color": overlayColor, initial: { opacity: 0 }, animate: { opacity: 0.95 }, transition: { duration: 0.2 }, exit: { opacity: 0 } }, seedID('modal-backdrop'))), children] }, void 0)) }, void 0) }, void 0));
15
+ const content = (_jsx(OverlayProvider, { onClose: onClose, children: _jsx(AnimatePresence, { exitBeforeEnter: true, children: children && (_jsx("div", { "data-overlay-container": true, "data-overlay-container-obfuscate": obfuscate, className: styles.OverlayContainer, style: { zIndex: index }, children: _jsxs(LazyMotion, { features: domMax, children: [obfuscate && (_jsx(m.span, { className: styles.Backdrop, "data-overlay-color": overlayColor, initial: { opacity: 0 }, animate: { opacity: 0.95 }, transition: { duration: 0.2 }, exit: { opacity: 0 } }, seedID('modal-backdrop'))), children] }) })) }) }));
16
16
  return createPortal(content, root);
17
17
  };
@@ -12,7 +12,7 @@ export const OverlayProvider = (props) => {
12
12
  return (_jsx(OverlayContext.Provider, { value: {
13
13
  titleId,
14
14
  onClose
15
- }, children: children }, void 0));
15
+ }, children: children }));
16
16
  };
17
17
  export const useOverlayContext = () => {
18
18
  const context = useContext(OverlayContext);
@@ -13,5 +13,5 @@ export const Pagination = ({ className, itemsCount, itemsPerPage = 10, onPageCli
13
13
  const newOffset = (event.selected * itemsPerPage) % itemsCount;
14
14
  onPageClick && onPageClick({ ...event, offset: newOffset });
15
15
  };
16
- return (_jsx(ReactPaginate, { containerClassName: clsx(styles.Pagination, className), breakLabel: "...", nextLabel: _jsx(Icon, { dimension: 16, source: "chevron-right" }, void 0), previousLabel: _jsx(Icon, { dimension: 16, source: "chevron-left" }, void 0), onPageChange: handlePageClick, pageRangeDisplayed: pageRangeDisplayed, pageCount: pageCount || computedPageCount, marginPagesDisplayed: marginPagesDisplayed, ...otherProps }, void 0));
16
+ return (_jsx(ReactPaginate, { containerClassName: clsx(styles.Pagination, className), breakLabel: "...", nextLabel: _jsx(Icon, { dimension: 16, source: "chevron-right" }), previousLabel: _jsx(Icon, { dimension: 16, source: "chevron-left" }), onPageChange: handlePageClick, pageRangeDisplayed: pageRangeDisplayed, pageCount: pageCount || computedPageCount, marginPagesDisplayed: marginPagesDisplayed, ...otherProps }));
17
17
  };
@@ -0,0 +1,4 @@
1
+ export { Popover as Dropdown } from './popover';
2
+ export { Popover } from './popover';
3
+ export type { PopoverProps } from './popover';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { Popover as Dropdown } from './popover';
2
+ export { Popover } from './popover';
@@ -0,0 +1,95 @@
1
+ import { ReactNode } from 'react';
2
+ import { AutoPlacement, BasePlacement, VariationPlacement } from '@popperjs/core';
3
+ export declare type PopoverProps = PropsWithClass & {
4
+ /**
5
+ * The content of the popover to display when the popover is open.
6
+ */
7
+ children: ReactNode;
8
+ /**
9
+ * The element to use as the trigger for the popover.
10
+ */
11
+ trigger: ReactNode;
12
+ /**
13
+ * The distance from the trigger to the popover.
14
+ */
15
+ offset?: number;
16
+ /**
17
+ * The placement of the popover. This is automatically handled based on
18
+ * scroll and viewport edges. By default the popover is anchored at
19
+ * the beginning of the trigger.
20
+ *
21
+ * The first key refers to the X axis, the second key refers to the Y axis.
22
+ * Eg: `auto-start` means the popover will be placed automatically on left or right
23
+ * based on the available space, and anchored at the top (start) of the trigger.
24
+ */
25
+ placement?: AutoPlacement | BasePlacement | VariationPlacement;
26
+ /**
27
+ * Enable or disable the itneraction on the trigger.
28
+ */
29
+ disabled?: boolean;
30
+ /**
31
+ * Callback triggered when the popover state changes.
32
+ * It returns the new `boolean` state.
33
+ */
34
+ onOpenChange?: (open: boolean) => void;
35
+ /**
36
+ * Programmatically open or close the popover. If set to `true`, the popover
37
+ * will be open when rendered. This make the popover a controlled component.
38
+ */
39
+ open?: boolean;
40
+ /**
41
+ * Enable or disable the auto close of the popover when clicking outside of it.
42
+ */
43
+ closeOnOutsideClick?: boolean;
44
+ /**
45
+ * Set the popover element the same with of the trigger element.
46
+ */
47
+ matchTriggerWidth?: boolean;
48
+ };
49
+ export declare const Popover: import("react").ForwardRefExoticComponent<PropsWithClass & {
50
+ /**
51
+ * The content of the popover to display when the popover is open.
52
+ */
53
+ children: ReactNode;
54
+ /**
55
+ * The element to use as the trigger for the popover.
56
+ */
57
+ trigger: ReactNode;
58
+ /**
59
+ * The distance from the trigger to the popover.
60
+ */
61
+ offset?: number | undefined;
62
+ /**
63
+ * The placement of the popover. This is automatically handled based on
64
+ * scroll and viewport edges. By default the popover is anchored at
65
+ * the beginning of the trigger.
66
+ *
67
+ * The first key refers to the X axis, the second key refers to the Y axis.
68
+ * Eg: `auto-start` means the popover will be placed automatically on left or right
69
+ * based on the available space, and anchored at the top (start) of the trigger.
70
+ */
71
+ placement?: AutoPlacement | BasePlacement | VariationPlacement | undefined;
72
+ /**
73
+ * Enable or disable the itneraction on the trigger.
74
+ */
75
+ disabled?: boolean | undefined;
76
+ /**
77
+ * Callback triggered when the popover state changes.
78
+ * It returns the new `boolean` state.
79
+ */
80
+ onOpenChange?: ((open: boolean) => void) | undefined;
81
+ /**
82
+ * Programmatically open or close the popover. If set to `true`, the popover
83
+ * will be open when rendered. This make the popover a controlled component.
84
+ */
85
+ open?: boolean | undefined;
86
+ /**
87
+ * Enable or disable the auto close of the popover when clicking outside of it.
88
+ */
89
+ closeOnOutsideClick?: boolean | undefined;
90
+ /**
91
+ * Set the popover element the same with of the trigger element.
92
+ */
93
+ matchTriggerWidth?: boolean | undefined;
94
+ } & import("react").RefAttributes<HTMLDivElement>>;
95
+ //# sourceMappingURL=popover.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EASV,MAAM,OAAO,CAAA;AAId,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAY,MAAM,gBAAgB,CAAA;AAK3F,oBAAY,YAAY,GAAG,cAAc,GAAG;IAC1C;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,kBAAkB,CAAC;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAA;AAqBD,eAAO,MAAM,OAAO;IAjElB;;OAEG;cACO,SAAS;IACnB;;OAEG;aACM,SAAS;IAClB;;OAEG;;IAEH;;;;;;;;OAQG;;IAEH;;OAEG;;IAEH;;;OAGG;2BACmB,OAAO,KAAK,IAAI;IACtC;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;kDAkJH,CAAA"}
@@ -0,0 +1,93 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, Children, cloneElement, useRef, forwardRef, isValidElement, useEffect, useMemo } from 'react';
3
+ import { useKeyPress, useFocusWithin } from 'ahooks';
4
+ import styles from './popover.module.css';
5
+ import { useUIDSeed } from 'react-uid';
6
+ import { usePopperTooltip } from 'react-popper-tooltip';
7
+ import { domMax, LazyMotion, m, AnimatePresence } from 'framer-motion';
8
+ import clsx from 'clsx';
9
+ const PopoverAnimation = {
10
+ visible: {
11
+ y: 0,
12
+ opacity: 1,
13
+ transition: {
14
+ ease: [0, 0, 0.34, 1],
15
+ duration: 0.1
16
+ }
17
+ },
18
+ hidden: {
19
+ y: -5,
20
+ opacity: 0,
21
+ transition: {
22
+ ease: [0.3, 0.07, 1, 1],
23
+ duration: 0.1
24
+ }
25
+ }
26
+ };
27
+ export const Popover = forwardRef(({ children, trigger, offset = 8, placement = 'auto-start', open, disabled, closeOnOutsideClick = true, className, matchTriggerWidth, onOpenChange, ...otherProps }, forwardedRef) => {
28
+ const seedID = useUIDSeed();
29
+ const popoverRef = useRef(forwardedRef);
30
+ const [isOpen, setIsOpen] = useState(false);
31
+ const sameWidth = useMemo(() => ({
32
+ name: 'sameWidth',
33
+ enabled: true,
34
+ phase: 'beforeWrite',
35
+ requires: ['computeStyles'],
36
+ fn: ({ state }) => {
37
+ if (matchTriggerWidth)
38
+ state.styles.popper.width = `${state.rects.reference.width}px`;
39
+ },
40
+ effect: ({ state }) => {
41
+ const referenceElement = state.elements.reference;
42
+ if (matchTriggerWidth)
43
+ state.elements.popper.style.width = `${referenceElement.offsetWidth}px`;
44
+ }
45
+ }), [matchTriggerWidth]);
46
+ const { getTooltipProps, setTooltipRef, setTriggerRef, visible } = usePopperTooltip({
47
+ delayShow: 0,
48
+ delayHide: 0,
49
+ trigger: !disabled ? ['click'] : null,
50
+ visible: isOpen,
51
+ closeOnTriggerHidden: true,
52
+ closeOnOutsideClick,
53
+ onVisibleChange: state => {
54
+ onOpenChange?.(state);
55
+ setIsOpen(state);
56
+ }
57
+ }, {
58
+ placement,
59
+ modifiers: [
60
+ sameWidth,
61
+ {
62
+ name: 'offset',
63
+ options: {
64
+ offset: [0, offset]
65
+ }
66
+ }
67
+ ]
68
+ });
69
+ const isFocusWithin = useFocusWithin(popoverRef, {
70
+ onBlur: (e) => {
71
+ if (e.relatedTarget && visible) {
72
+ setIsOpen(false);
73
+ }
74
+ }
75
+ });
76
+ useKeyPress('esc', () => setIsOpen(false));
77
+ useEffect(() => {
78
+ open !== undefined && setIsOpen(open);
79
+ }, [open]);
80
+ return (_jsxs("div", { ref: popoverRef, className: clsx(styles.Popover, className), "data-popover-has-focus": isFocusWithin, children: [Children.map(trigger, (child) => isValidElement(child) && cloneElement(child, {
81
+ ref: setTriggerRef,
82
+ id: seedID('popover-trigger'),
83
+ key: seedID('popover-trigger'),
84
+ 'aria-haspopup': 'true',
85
+ 'aria-controls': seedID('popover-dialog'),
86
+ 'aria-expanded': isOpen,
87
+ ...otherProps
88
+ })), _jsx(AnimatePresence, { children: visible && (_jsx("div", { ref: setTooltipRef, role: "tooltip", id: seedID('tooltip-content'), ...getTooltipProps({ className: styles.PopUp }), children: _jsx(LazyMotion, { features: domMax, children: _jsx(m.div, { variants: PopoverAnimation, initial: "hidden", animate: "visible", exit: "hidden", children: Children.map(children, (child) => isValidElement(child) && cloneElement(child, {
89
+ id: seedID('popover-dialog'),
90
+ 'aria-labelledby': seedID('popover-trigger')
91
+ })) }) }) }, seedID('tooltip-content'))) })] }));
92
+ });
93
+ Popover.displayName = 'Popover';
@@ -0,0 +1 @@
1
+ .Popover{display:contents}.PopUp{inline-size:max-content;z-index:2}
@@ -3,5 +3,5 @@ import { forwardRef } from 'react';
3
3
  import styles from './prose.module.css';
4
4
  import clsx from 'clsx';
5
5
  export const Prose = forwardRef(({ children, className, as: Wrapper = 'div', ...otherProps }, forwardedRef) => {
6
- return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Prose, className), ...otherProps, children: children }, void 0));
6
+ return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Prose, className), ...otherProps, children: children }));
7
7
  });
@@ -11,6 +11,6 @@ export const Select = forwardRef(({ children, className, disabled = false, icon
11
11
  regular: 16,
12
12
  big: 24
13
13
  };
14
- return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Select, className), "data-select-is-multiple": kind === 'multiple', "data-select-has-label": Boolean(label), "data-select-dimension": dimension, "aria-disabled": disabled, hAlign: "start", vAlign: "start", inline: true, tabIndex: disabled ? 0 : undefined, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('select'), children: label }, void 0), _jsxs("div", { className: styles.FieldContainer, children: [_jsx("select", { disabled: disabled, className: styles.Field, id: seedID('select'), multiple: kind === 'multiple', onChange: onChange, ref: forwardedRef, ...otherProps, children: children }, void 0), kind === 'single' && (_jsx(Icon, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }, void 0))] }, void 0)] }, void 0));
14
+ return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(styles.Select, className), "data-select-is-multiple": kind === 'multiple', "data-select-has-label": Boolean(label), "data-select-dimension": dimension, "aria-disabled": disabled, hAlign: "start", vAlign: "start", inline: true, tabIndex: disabled ? 0 : undefined, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: seedID('select'), children: label }), _jsxs("div", { className: styles.FieldContainer, children: [_jsx("select", { disabled: disabled, className: styles.Field, id: seedID('select'), multiple: kind === 'multiple', onChange: onChange, ref: forwardedRef, ...otherProps, children: children }), kind === 'single' && (_jsx(Icon, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] })] }));
15
15
  });
16
16
  Select.displayName = 'Select';
@@ -1 +1 @@
1
- .Select{-webkit-appearance:none;appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.33rem;--field-padding:0.33rem;--font-size:0.78rem}.Select[data-select-dimension=regular]{--field-height:2.22rem;--field-padding:0.89rem;--font-size:0.89rem}.Select[data-select-dimension=big]{--field-height:2.67rem;--field-padding:0.89rem;--font-size:1.00rem}.FieldContainer{color:var(--global-vibrancy-foreground);inline-size:100%;position:relative}.Select[aria-disabled=true] .FieldContainer{color:var(--global-disabled-foreground)}.Field{-webkit-appearance:none;appearance:none;-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background));block-size:var(--field-height);border:0;border-radius:.22rem;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size);inline-size:100%;margin:0;overflow:hidden;padding:0 calc(var(--field-padding)*3.5) 0 var(--field-padding);text-overflow:ellipsis}.Field:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));color:var(--global-disabled-foreground);cursor:not-allowed}.Field option{color:#000}.Field optgroup{color:initial}.Field[multiple]{block-size:auto;overflow:auto;padding:.44rem .89rem}.Field[multiple] option{color:currentColor;padding:calc(var(--field-padding)/2) var(--field-padding)}.Field[multiple] option:checked{background:var(--dimmed-4) linear-gradient(to bottom,var(--dimmed-4) 0,var(--dimmed-4) 100%);background-color:var(--dimmed-4);color:var(--dimmed-0)}.Field[multiple] optgroup{color:currentColor;font-family:inherit;font-size:inherit;line-height:inherit;margin:0 0 1rem}.Icon{border-radius:.22rem;pointer-events:none;position:absolute;right:calc(var(--field-padding) - var(--field-padding)/3);top:calc(var(--field-height)/2);transform:translateY(-50%)}
1
+ .Select{-webkit-appearance:none;appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.33rem;--field-padding:0.33rem;--font-size:0.78rem}.Select[data-select-dimension=regular]{--field-height:2.22rem;--field-padding:0.89rem;--font-size:0.89rem}.Select[data-select-dimension=big]{--field-height:2.67rem;--field-padding:0.89rem;--font-size:1.00rem}.FieldContainer{color:var(--global-vibrancy-foreground);inline-size:100%;position:relative}.Select[aria-disabled=true] .FieldContainer{color:var(--global-disabled-foreground)}.Field{-webkit-appearance:none;appearance:none;-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-vibrancy-background),var(--global-vibrancy-background));block-size:var(--field-height);border:0;border-radius:.22rem;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size);inline-size:100%;margin:0;overflow:hidden;padding:0 calc(var(--field-padding)*3.5) 0 var(--field-padding);text-overflow:ellipsis}.Field:disabled{background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));color:var(--global-disabled-foreground);cursor:not-allowed}.Field option{color:#000}.Field optgroup{color:initial}.Field[multiple]{block-size:auto;overflow:auto;padding:.44rem .89rem}.Field[multiple] option{color:currentcolor;padding:calc(var(--field-padding)/2) var(--field-padding)}.Field[multiple] option:checked{background:var(--dimmed-4) linear-gradient(to bottom,var(--dimmed-4) 0,var(--dimmed-4) 100%);background-color:var(--dimmed-4);color:var(--dimmed-0)}.Field[multiple] optgroup{color:currentcolor;font-family:inherit;font-size:inherit;line-height:inherit;margin:0 0 1rem}.Icon{border-radius:.22rem;pointer-events:none;position:absolute;right:calc(var(--field-padding) - var(--field-padding)/3);top:calc(var(--field-height)/2);transform:translateY(-50%)}
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAc,mBAAmB,EAAqB,MAAM,OAAO,CAAA;AAGvF,oBAAY,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACvD,CAAA;AAED,eAAO,MAAM,QAAQ;IApBnB;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;qBACc,YAAY,gBAAgB,CAAC,GAAG,IAAI;oDA+BrD,CAAA"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAc,mBAAmB,EAAqB,MAAM,OAAO,CAAA;AAIvF,oBAAY,aAAa,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAClE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACvD,CAAA;AAED,eAAO,MAAM,QAAQ;IApBnB;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;qBACc,YAAY,gBAAgB,CAAC,GAAG,IAAI;oDAuCrD,CAAA"}
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { forwardRef, useEffect, useRef } from 'react';
4
4
  import styles from './selection-controls.module.css';
5
+ import { domAnimation, LazyMotion, m } from 'framer-motion';
5
6
  export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular', onChange, indeterminate, ...otherProps }, forwardedRef) => {
6
7
  const ref = useRef(forwardedRef);
7
8
  useEffect(() => {
@@ -9,6 +10,6 @@ export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular'
9
10
  ref.current.indeterminate = indeterminate;
10
11
  }
11
12
  }, [indeterminate]);
12
- return (_jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(styles.Checkbox, className), ref: ref, ...otherProps }, void 0));
13
+ return (_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: styles.InputWrapper, whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, children: _jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(styles.CheckboxInput, className), ref: ref, ...otherProps }) }) }));
13
14
  });
14
15
  Checkbox.displayName = 'Checkbox';
@@ -1 +1 @@
1
- {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/radio.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAGpE,oBAAY,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACvD,CAAA;AAED,eAAO,MAAM,KAAK;IAfhB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;qBACc,YAAY,gBAAgB,CAAC,GAAG,IAAI;oDAsBrD,CAAA"}
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/radio.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAIpE,oBAAY,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACvD,CAAA;AAED,eAAO,MAAM,KAAK;IAfhB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;qBACc,YAAY,gBAAgB,CAAC,GAAG,IAAI;oDA8BrD,CAAA"}
@@ -2,7 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import clsx from 'clsx';
3
3
  import { forwardRef } from 'react';
4
4
  import styles from './selection-controls.module.css';
5
+ import { domAnimation, LazyMotion, m } from 'framer-motion';
5
6
  export const Radio = forwardRef(({ className, disabled, dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
6
- return (_jsx("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(styles.Radio, className), ref: forwardedRef, ...otherProps }, void 0));
7
+ return (_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: styles.InputWrapper, whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, children: _jsx("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(styles.RadioInput, className), ref: forwardedRef, ...otherProps }) }) }));
7
8
  });
8
9
  Radio.displayName = 'Radio';
@@ -1 +1 @@
1
- .Checkbox{--w:24px;--h:24px;-webkit-appearance:none;appearance:none;-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);block-size:var(--h);border-radius:.22rem;color:var(--global-background);inline-size:var(--w);max-block-size:var(--h);max-inline-size:var(--w);position:relative}.Checkbox:after{block-size:27%;border-bottom:2px solid;border-left:2px solid;content:"";display:none;inline-size:50%;left:50%;position:absolute;top:50%;transform:translate(-50%,-80%) rotate(-45deg)}.Checkbox:active{background-color:var(--global-vibrancy-background-hard)}.Checkbox:checked,.Checkbox:indeterminate{background:var(--dimmed-7)}.Checkbox:checked:after,.Checkbox:indeterminate:after{display:block}.Checkbox:disabled{background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed}.Checkbox[data-control-dimension=small]{--w:16px;--h:16px}.Checkbox:indeterminate:after{block-size:2px;border-left:0;transform:translate(-50%,-50%)}.Radio{composes:Checkbox;border-radius:100%}.Radio:after{background-color:currentcolor;block-size:50%;border:0;border-radius:100%;inline-size:50%;transform:translate(-50%,-50%)}.Toggle{--w:44px;--h:24px;--p:2px;composes:Radio;border-radius:200px;color:var(--dimmed-7)}.Toggle:checked{color:var(--global-background)}.Toggle:disabled{color:var(--global-disabled-foreground)}.Toggle:after{block-size:calc(var(--h) - var(--p)*2);bottom:var(--p);display:block;inline-size:calc(var(--h) - var(--p)*2);left:var(--p);top:var(--p);transform:none;transition:transform .1s cubic-bezier(.3,.07,.34,1),background-color .1s cubic-bezier(.3,.07,.34,1)}.Toggle:checked:after{display:block;transform:translateX(100%)}.Toggle[data-control-dimension=small]{--w:28px;--h:16px}
1
+ .InputWrapper{display:inline-block;line-height:0}.CheckboxInput{--w:24px;--h:24px;-webkit-appearance:none;appearance:none;-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background-color:var(--global-vibrancy-background);block-size:var(--h);border-radius:.22rem;box-shadow:0 0 0 1px var(--global-background),inset 0 0 0 1px var(--dimmed-2);color:var(--global-background);inline-size:var(--w);max-block-size:var(--h);max-inline-size:var(--w);position:relative}.CheckboxInput:after{block-size:27%;border-bottom:2px solid;border-left:2px solid;content:"";display:none;inline-size:50%;left:50%;position:absolute;top:50%;transform:translate(-50%,-80%) rotate(-45deg)}.CheckboxInput:active{background-color:var(--global-vibrancy-background-hard)}.CheckboxInput:checked,.CheckboxInput:indeterminate{background:var(--dimmed-7);box-shadow:0 0 0 1px var(--global-background),inset 0 0 0 1px transparent}.CheckboxInput:checked:after,.CheckboxInput:indeterminate:after{display:block}.CheckboxInput:disabled{background-color:var(--global-disabled-background);color:var(--global-disabled-foreground);cursor:not-allowed}.CheckboxInput[data-control-dimension=small]{--w:16px;--h:16px}.CheckboxInput:indeterminate:after{block-size:2px;border-left:0;transform:translate(-50%,-50%)}.RadioInput{composes:CheckboxInput;border-radius:100%}.RadioInput:after{background-color:currentcolor;block-size:50%;border:0;border-radius:100%;inline-size:50%;transform:translate(-50%,-50%)}.Toggle{--w:44px;--h:24px;--p:2px;composes:RadioInput;border-radius:200px;color:var(--dimmed-7)}.Toggle:checked{color:var(--global-background)}.Toggle:disabled{color:var(--global-disabled-foreground)}.Toggle:after{block-size:calc(var(--h) - var(--p)*2);bottom:var(--p);display:block;inline-size:calc(var(--h) - var(--p)*2);left:var(--p);top:var(--p);transform:none;transition:transform .1s cubic-bezier(.3,.07,.34,1),background-color .1s cubic-bezier(.3,.07,.34,1)}.Toggle:checked:after{display:block;transform:translateX(100%)}.Toggle[data-control-dimension=small]{--w:28px;--h:16px}
@@ -3,6 +3,6 @@ import clsx from 'clsx';
3
3
  import { forwardRef } from 'react';
4
4
  import styles from './selection-controls.module.css';
5
5
  export const Toggle = forwardRef(({ className, disabled, dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
6
- return (_jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(styles.Toggle, className), ref: forwardedRef, ...otherProps }, void 0));
6
+ return (_jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, onChange: onChange, className: clsx(styles.Toggle, className), ref: forwardedRef, ...otherProps }));
7
7
  });
8
8
  Toggle.displayName = 'Toggle';
@@ -3,6 +3,6 @@ import { forwardRef } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import styles from './separator.module.css';
5
5
  export const Separator = forwardRef(({ className, ...otherProps }, forwardedRef) => {
6
- return (_jsx("hr", { ref: forwardedRef, className: clsx(styles.Separator, className), ...otherProps }, void 0));
6
+ return (_jsx("hr", { ref: forwardedRef, className: clsx(styles.Separator, className), ...otherProps }));
7
7
  });
8
8
  Separator.displayName = 'Separator';
@@ -14,11 +14,11 @@ export const Skeleton = ({ className, borderRadius = 4, style, width, height, co
14
14
  '--height': height && computedHeight,
15
15
  '--gap': gap ? tkns.space[gap] : undefined
16
16
  };
17
- return (_jsx("span", { className: styles.SkeletonItem, "data-skeleton-circle": circle, "data-skeleton-animated": enableAnimation, style: { ...dynamicStyle, ...style }, children: "\u200C" }, void 0));
17
+ return (_jsx("span", { className: styles.SkeletonItem, "data-skeleton-circle": circle, "data-skeleton-animated": enableAnimation, style: { ...dynamicStyle, ...style }, children: "\u200C" }));
18
18
  }, [borderRadius, width, computedWidth, height, computedHeight, gap, circle, enableAnimation, style]);
19
19
  return (_jsx("span", { className: className, "aria-live": "polite", "aria-busy": enableAnimation, ...otherProps, children: Array.from({ length: count }).map((_, i) => {
20
20
  return inline
21
21
  ? _jsx(SkeletonItem, {}, uid(i))
22
- : (_jsxs(Fragment, { children: [_jsx(SkeletonItem, {}, void 0), _jsx("br", {}, void 0)] }, uid(i)));
23
- }) }, void 0));
22
+ : (_jsxs(Fragment, { children: [_jsx(SkeletonItem, {}), _jsx("br", {})] }, uid(i)));
23
+ }) }));
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/slider/slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAyB,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAqB,SAAS,EAAE,MAAM,cAAc,CAAA;AAI3D,oBAAY,WAAW,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAChE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC,CAAA;AAED,eAAO,MAAM,MAAM;IA1CjB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;oBACa,MAAM,GAAG,IAAI;IAC7B;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;oDAyDH,CAAA"}
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/slider/slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,mBAAmB,EAAyB,MAAM,OAAO,CAAA;AAC9E,OAAO,EAAqB,SAAS,EAAa,MAAM,cAAc,CAAA;AAItE,oBAAY,WAAW,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAChE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC,CAAA;AAED,eAAO,MAAM,MAAM;IA1CjB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;oBACa,MAAM,GAAG,IAAI;IAC7B;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;oDA0DH,CAAA"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, useCallback, useState } from 'react';
3
- import { Stack, Text, Icon } from '../..';
3
+ import { Stack, Text, Icon, Textfield } from '../..';
4
4
  import styles from './slider.module.css';
5
5
  import clsx from 'clsx';
6
6
  export const Slider = forwardRef(({ min = 0, max = 100, step, onInput, className, defaultValue = 0, dimension = 'regular', showValues, iconMin, iconMax, ...otherProps }, forwardedRef) => {
@@ -10,6 +10,6 @@ export const Slider = forwardRef(({ min = 0, max = 100, step, onInput, className
10
10
  onInput && onInput(currentTarget.valueAsNumber);
11
11
  setValue(currentTarget.valueAsNumber);
12
12
  }, [onInput]);
13
- return (_jsxs(Stack, { direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.Slider, className), "data-slider-dimension": dimension, children: [showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", textAlign: "end", className: styles.Value, children: value }, void 0), (iconMin && !showValues) && _jsx(Icon, { source: iconMin, dimension: isSmall ? 16 : 24 }, void 0), _jsx("input", { ref: forwardedRef, className: styles.Input, type: "range", min: min, max: max, defaultValue: value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, step: step, onInput: handleInput, ...otherProps }, void 0), showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", className: styles.Value, children: max }, void 0), (iconMax && !showValues) && _jsx(Icon, { source: iconMax, dimension: isSmall ? 16 : 24 }, void 0)] }, void 0));
13
+ return (_jsxs(Stack, { direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.Slider, className), "data-slider-dimension": dimension, children: [showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", textAlign: "end", className: styles.Value, children: min }), (iconMin && !showValues) && _jsx(Icon, { source: iconMin, dimension: isSmall ? 16 : 24 }), _jsx("input", { ref: forwardedRef, className: styles.Input, type: "range", min: min, max: max, defaultValue: value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, step: step, onInput: handleInput, ...otherProps }), showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", className: styles.Value, children: max }), showValues && _jsx(Textfield, { readOnly: true, dimension: "small", size: String(max).length, value: value, className: styles.CurrentValue }), (iconMax && !showValues) && _jsx(Icon, { source: iconMax, dimension: isSmall ? 16 : 24 })] }));
14
14
  });
15
15
  Slider.displayName = 'Slider';
@@ -1 +1 @@
1
- .Slider svg{flex-shrink:0}.Input{--track-color:var(--global-vibrancy-background);--progress-color:var(--dimmed-3);--thumb-size:24px;--progress-direction:calc(-9999px - var(--thumb-size)/2);-webkit-appearance:none;appearance:none;background:transparent;border-radius:100px;height:var(--thumb-size);overflow:hidden;width:100%}[dir=rtl] .Input{--progress-direction:calc(9999px + var(--thumb-size)/2)}.Slider[data-slider-dimension=small] .Input{--thumb-size:16px}.Input::-webkit-slider-runnable-track{background:var(--track-color);cursor:pointer;height:var(--thumb-size);-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;width:100%}.Input::-moz-range-track{background:var(--track-color);cursor:pointer;height:var(--thumb-size);-moz-transition:background-color .2s ease-out;transition:background-color .2s ease-out;width:100%}.Input::-moz-focus-outer{border:0}.Input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:var(--dimmed-7);border:0;border-radius:100%;box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);height:var(--thumb-size);outline-offset:-2px;-webkit-transition:box-shadow .1s ease-out,background-color .1s ease-out;transition:box-shadow .1s ease-out,background-color .1s ease-out;width:var(--thumb-size)}.Input::-webkit-slider-thumb:active,.Input::-webkit-slider-thumb:focus{background-color:var(--dimmed-6)}.Input::-moz-range-thumb{appearance:none;background-color:var(--dimmed-7);border:0;border-radius:100%;box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);height:var(--thumb-size);outline-offset:-2px;-moz-transition:box-shadow .1s ease-out,background-color .1s ease-out;transition:box-shadow .1s ease-out,background-color .1s ease-out;width:var(--thumb-size)}.Input::-moz-range-thumb:active,.Input::-moz-range-thumb:focus{background-color:var(--dimmed-6)}.Input:active::-webkit-slider-thumb{background-color:var(--dimmed-7);box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);cursor:grabbing}.Input:active::-moz-range-thumb{background-color:var(--dimmed-7);box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);cursor:grabbing}.Input:disabled::-webkit-slider-runnable-track{background:var(--global-disabled-background);cursor:not-allowed}.Input:disabled::-moz-range-track{background:var(--global-disabled-background);cursor:not-allowed}.Input:disabled::-webkit-slider-thumb{background:none var(--global-disabled-foreground);box-shadow:var(--progress-direction) 0 0 9999px transparent;cursor:not-allowed}.Input:disabled::-moz-range-thumb{background:none var(--global-disabled-foreground);box-shadow:var(--progress-direction) 0 0 9999px transparent;cursor:not-allowed}.Value{inline-size:48px}
1
+ .Slider svg{flex-shrink:0}.Input{--track-color:var(--global-vibrancy-background);--progress-color:var(--dimmed-3);--thumb-size:24px;--progress-direction:calc(-9999px - var(--thumb-size)/2);-webkit-appearance:none;appearance:none;background:transparent;border-radius:100px;height:var(--thumb-size);overflow:hidden;width:100%}[dir=rtl] .Input{--progress-direction:calc(9999px + var(--thumb-size)/2)}.Slider[data-slider-dimension=small] .Input{--thumb-size:16px}.Input::-webkit-slider-runnable-track{background:var(--track-color);cursor:pointer;height:var(--thumb-size);-webkit-transition:background-color .2s ease-out;transition:background-color .2s ease-out;width:100%}.Input::-moz-range-track{background:var(--track-color);cursor:pointer;height:var(--thumb-size);-moz-transition:background-color .2s ease-out;transition:background-color .2s ease-out;width:100%}.Input::-moz-focus-outer{border:0}.Input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background-color:var(--dimmed-7);border:0;border-radius:100%;box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);height:var(--thumb-size);outline-offset:-2px;-webkit-transition:box-shadow .1s ease-out,background-color .1s ease-out;transition:box-shadow .1s ease-out,background-color .1s ease-out;width:var(--thumb-size)}.Input::-webkit-slider-thumb:active,.Input::-webkit-slider-thumb:focus{background-color:var(--dimmed-6)}.Input::-moz-range-thumb{appearance:none;background-color:var(--dimmed-7);border:0;border-radius:100%;box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);height:var(--thumb-size);outline-offset:-2px;-moz-transition:box-shadow .1s ease-out,background-color .1s ease-out;transition:box-shadow .1s ease-out,background-color .1s ease-out;width:var(--thumb-size)}.Input::-moz-range-thumb:active,.Input::-moz-range-thumb:focus{background-color:var(--dimmed-6)}.Input:active::-webkit-slider-thumb{background-color:var(--dimmed-7);box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);cursor:grabbing}.Input:active::-moz-range-thumb{background-color:var(--dimmed-7);box-shadow:var(--progress-direction) 0 0 9999px var(--progress-color);cursor:grabbing}.Input:disabled::-webkit-slider-runnable-track{background:var(--global-disabled-background);cursor:not-allowed}.Input:disabled::-moz-range-track{background:var(--global-disabled-background);cursor:not-allowed}.Input:disabled::-webkit-slider-thumb{background:none var(--global-disabled-foreground);box-shadow:var(--progress-direction) 0 0 9999px transparent;cursor:not-allowed}.Input:disabled::-moz-range-thumb{background:none var(--global-disabled-foreground);box-shadow:var(--progress-direction) 0 0 9999px transparent;cursor:not-allowed}.CurrentValue,.Value{flex-shrink:0}
@@ -11,5 +11,5 @@ export const Snackbar = forwardRef(({ children, className, title, icon, kind = '
11
11
  positive: 'check',
12
12
  danger: 'circle-x'
13
13
  };
14
- return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Snackbar, className), "data-snackbar-kind": kind, role: "status", ...otherProps, children: _jsxs(Stack, { vAlign: "start", hAlign: "start", direction: "row", columnGap: 16, fill: false, children: [_jsx(Icon, { className: styles.Icon, weight: "duotone", source: icon || defaultIcons[kind], dimension: 24 }, void 0), _jsxs(Stack, { rowGap: 16, children: [_jsxs(Stack, { rowGap: 8, children: [title && _jsx(Title, { level: "5", children: title }, void 0), _jsx("p", { children: children }, void 0)] }, void 0), dismissable && (_jsx(Stack, { hAlign: "end", children: _jsx(Button, { onClick: onDismiss, className: styles.Action, children: dismissLabel }, void 0) }, void 0))] }, void 0)] }, void 0) }, void 0));
14
+ return (_jsx(Wrapper, { ref: forwardedRef, className: clsx(styles.Snackbar, className), "data-snackbar-kind": kind, role: "status", ...otherProps, children: _jsxs(Stack, { vAlign: "start", hAlign: "start", direction: "row", columnGap: 16, fill: false, children: [_jsx(Icon, { className: styles.Icon, weight: "duotone", source: icon || defaultIcons[kind], dimension: 24 }), _jsxs(Stack, { rowGap: 16, children: [_jsxs(Stack, { rowGap: 8, children: [title && _jsx(Title, { level: "5", children: title }), _jsx("p", { children: children })] }), dismissable && (_jsx(Stack, { hAlign: "end", children: _jsx(Button, { onClick: onDismiss, className: styles.Action, children: dismissLabel }) }))] })] }) }));
15
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,OAAO,CAAA;AAIjD,oBAAY,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,OAAO;IAVlB;;OAEG;;IAEH;;OAEG;;iDA4DH,CAAA"}
1
+ {"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../../src/components/spinner/spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAE,MAAM,OAAO,CAAA;AAIjD,oBAAY,YAAY,GAAG,aAAa,CAAC,UAAU,CAAC,GAAG;IACrD;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,OAAO;IAVlB;;OAEG;;IAEH;;OAEG;;iDA8DH,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import clsx from 'clsx';
4
- import { motion } from 'framer-motion';
4
+ import { domMax, LazyMotion, m } from 'framer-motion';
5
5
  export const Spinner = forwardRef(({ className, style, color, dimension = 'big' }, forwardedRef) => {
6
6
  const attributes = {
7
7
  small: {
@@ -14,10 +14,10 @@ export const Spinner = forwardRef(({ className, style, color, dimension = 'big'
14
14
  size: 30
15
15
  }
16
16
  };
17
- return (_jsx(motion.svg, { ref: forwardedRef, className: clsx(className), animate: { rotate: '2turn' }, transition: {
18
- duration: 2,
19
- repeat: Infinity,
20
- repeatDelay: 2
21
- }, style: { ...style, originX: '50%', originY: '50%' }, width: attributes[dimension].size, height: attributes[dimension].size, viewBox: "0 0 38 38", stroke: color || 'currentColor', xmlns: "http://www.w3.org/2000/svg", strokeLinecap: "round", children: _jsxs("g", { transform: "translate(1 1)", strokeWidth: 2, fill: "none", fillRule: "evenodd", children: [_jsx("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }, void 0), _jsx("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: _jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "1s", repeatCount: "indefinite" }, void 0) }, void 0)] }, void 0) }, void 0));
17
+ return (_jsx(LazyMotion, { features: domMax, strict: true, children: _jsx(m.svg, { ref: forwardedRef, className: clsx(className), animate: { rotate: '2turn' }, transition: {
18
+ duration: 2,
19
+ repeat: Infinity,
20
+ repeatDelay: 2
21
+ }, style: { ...style, originX: '50%', originY: '50%' }, width: attributes[dimension].size, height: attributes[dimension].size, viewBox: "0 0 38 38", stroke: color || 'currentColor', xmlns: "http://www.w3.org/2000/svg", strokeLinecap: "round", children: _jsxs("g", { transform: "translate(1 1)", strokeWidth: 2, fill: "none", fillRule: "evenodd", children: [_jsx("circle", { strokeOpacity: 0.5, cx: 18, cy: 18, r: 18 }), _jsx("path", { d: "M36 18c0-9.94-8.06-18-18-18", children: _jsx("animateTransform", { attributeName: "transform", type: "rotate", from: "0 18 18", to: "360 18 18", dur: "1s", repeatCount: "indefinite" }) })] }) }) }));
22
22
  });
23
23
  Spinner.displayName = 'Spinner';