@wonderflow/react-components 11.0.7 → 12.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 (127) hide show
  1. package/core/basic.css +1 -1
  2. package/core/typography.css +1 -1
  3. package/core.css +1 -1
  4. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  5. package/dist/components/autocomplete/autocomplete.js +1 -1
  6. package/dist/components/avatar/avatar.d.ts.map +1 -1
  7. package/dist/components/avatar/avatar.js +3 -1
  8. package/dist/components/avatar/avatar.stories.js +1 -1
  9. package/dist/components/avatar/avatar.test.js +6 -2
  10. package/dist/components/button/button.module.css +1 -1
  11. package/dist/components/card/card.stories.d.ts.map +1 -1
  12. package/dist/components/card/card.stories.js +3 -8
  13. package/dist/components/chip/chip.js +1 -1
  14. package/dist/components/chip/chip.module.css +1 -1
  15. package/dist/components/circular-progress/circular-progress.module.css +1 -1
  16. package/dist/components/container/container.stories.js +1 -1
  17. package/dist/components/disclosure/disclosure.js +6 -6
  18. package/dist/components/disclosure/disclosure.module.css +1 -1
  19. package/dist/components/drawer/drawer.d.ts.map +1 -1
  20. package/dist/components/drawer/drawer.js +2 -2
  21. package/dist/components/index.d.ts +0 -2
  22. package/dist/components/index.d.ts.map +1 -1
  23. package/dist/components/index.js +0 -2
  24. package/dist/components/info-state/info-state.js +2 -2
  25. package/dist/components/input-group/input-group.js +1 -1
  26. package/dist/components/linear-progress/linear-progress.d.ts.map +1 -1
  27. package/dist/components/linear-progress/linear-progress.js +1 -1
  28. package/dist/components/list/list-item.js +6 -6
  29. package/dist/components/list/list.module.css +1 -1
  30. package/dist/components/menu/menu-item/menu-item.d.ts.map +1 -1
  31. package/dist/components/menu/menu-item/menu-item.js +2 -2
  32. package/dist/components/menu/menu-item/menu-item.module.css +1 -1
  33. package/dist/components/menu/menu-item/menu-item.stories.js +1 -1
  34. package/dist/components/menu/menu.stories.js +2 -2
  35. package/dist/components/modal/modal.d.ts +1 -2
  36. package/dist/components/modal/modal.d.ts.map +1 -1
  37. package/dist/components/modal/modal.js +3 -3
  38. package/dist/components/modal/modal.stories.d.ts.map +1 -1
  39. package/dist/components/modal/modal.stories.js +6 -6
  40. package/dist/components/pagination/pagination.module.css +1 -1
  41. package/dist/components/popover/popover.stories.d.ts +4 -0
  42. package/dist/components/popover/popover.stories.d.ts.map +1 -1
  43. package/dist/components/popover/popover.stories.js +16 -0
  44. package/dist/components/select/select.d.ts +8 -0
  45. package/dist/components/select/select.d.ts.map +1 -1
  46. package/dist/components/select/select.js +2 -2
  47. package/dist/components/select/select.module.css +1 -1
  48. package/dist/components/select/select.stories.d.ts +5 -2
  49. package/dist/components/select/select.stories.d.ts.map +1 -1
  50. package/dist/components/select/select.stories.js +7 -4
  51. package/dist/components/select/select.test.js +1 -1
  52. package/dist/components/selection-controls/checkbox.d.ts.map +1 -1
  53. package/dist/components/selection-controls/checkbox.js +1 -1
  54. package/dist/components/selection-controls/radio.d.ts.map +1 -1
  55. package/dist/components/selection-controls/radio.js +1 -1
  56. package/dist/components/selection-controls/selection-controls.module.css +1 -1
  57. package/dist/components/selection-controls/toggle.d.ts.map +1 -1
  58. package/dist/components/selection-controls/toggle.js +1 -1
  59. package/dist/components/skeleton/skeleton.module.css +1 -1
  60. package/dist/components/slider/slider.d.ts.map +1 -1
  61. package/dist/components/slider/slider.js +1 -1
  62. package/dist/components/snackbar/snackbar.d.ts.map +1 -1
  63. package/dist/components/snackbar/snackbar.js +9 -2
  64. package/dist/components/snackbar/snackbar.module.css +1 -1
  65. package/dist/components/star-meter/star-meter.js +5 -5
  66. package/dist/components/symbol/symbol.js +1 -1
  67. package/dist/components/tab/tab.module.css +1 -1
  68. package/dist/components/tab/tab.stories.d.ts.map +1 -1
  69. package/dist/components/tab/tab.stories.js +6 -0
  70. package/dist/components/table/table-cell/table-cell.module.css +1 -1
  71. package/dist/components/table/table-header/table-header.d.ts +2 -2
  72. package/dist/components/table/table-header/table-header.d.ts.map +1 -1
  73. package/dist/components/table/table-header/table-header.js +2 -2
  74. package/dist/components/table/table-pagination/table-pagination.js +2 -2
  75. package/dist/components/table/table-row/table-row.js +1 -1
  76. package/dist/components/table/table.js +1 -1
  77. package/dist/components/table/table.stories.js +2 -2
  78. package/dist/components/text/index.d.ts +1 -1
  79. package/dist/components/text/index.d.ts.map +1 -1
  80. package/dist/components/text/text.d.ts +42 -22
  81. package/dist/components/text/text.d.ts.map +1 -1
  82. package/dist/components/text/text.js +86 -5
  83. package/dist/components/text/text.module.css +1 -1
  84. package/dist/components/text/text.stories.d.ts +6 -1
  85. package/dist/components/text/text.stories.d.ts.map +1 -1
  86. package/dist/components/text/text.stories.js +63 -18
  87. package/dist/components/text/text.test.js +85 -0
  88. package/dist/components/textfield/base-field/base-field.module.css +1 -1
  89. package/dist/components/textfield/textfield.js +2 -2
  90. package/dist/components/textfield/textfield.module.css +1 -1
  91. package/dist/components/toggle-button/toggle-button.js +1 -1
  92. package/dist/components/tooltip/tooltip.module.css +1 -1
  93. package/dist/examples/shell.module.css +1 -1
  94. package/dist/examples/shell.stories.d.ts.map +1 -1
  95. package/dist/examples/shell.stories.js +2 -2
  96. package/dist/utils/themes.d.ts +3 -0
  97. package/dist/utils/themes.d.ts.map +1 -0
  98. package/dist/{components/prose/prose.js → utils/themes.js} +12 -6
  99. package/dist/utils/themes.test.d.ts +2 -0
  100. package/dist/utils/themes.test.d.ts.map +1 -0
  101. package/dist/utils/themes.test.js +26 -0
  102. package/package.json +3 -3
  103. package/dist/components/prose/index.d.ts +0 -3
  104. package/dist/components/prose/index.d.ts.map +0 -1
  105. package/dist/components/prose/index.js +0 -16
  106. package/dist/components/prose/prose.d.ts +0 -6
  107. package/dist/components/prose/prose.d.ts.map +0 -1
  108. package/dist/components/prose/prose.module.css +0 -1
  109. package/dist/components/prose/prose.stories.d.ts +0 -7
  110. package/dist/components/prose/prose.stories.d.ts.map +0 -1
  111. package/dist/components/prose/prose.stories.js +0 -12
  112. package/dist/components/prose/prose.test.d.ts +0 -2
  113. package/dist/components/prose/prose.test.d.ts.map +0 -1
  114. package/dist/components/prose/prose.test.js +0 -11
  115. package/dist/components/title/index.d.ts +0 -3
  116. package/dist/components/title/index.d.ts.map +0 -1
  117. package/dist/components/title/index.js +0 -16
  118. package/dist/components/title/title.d.ts +0 -40
  119. package/dist/components/title/title.d.ts.map +0 -1
  120. package/dist/components/title/title.js +0 -41
  121. package/dist/components/title/title.module.css +0 -1
  122. package/dist/components/title/title.stories.d.ts +0 -8
  123. package/dist/components/title/title.stories.d.ts.map +0 -1
  124. package/dist/components/title/title.stories.js +0 -47
  125. package/dist/components/title/title.test.d.ts +0 -2
  126. package/dist/components/title/title.test.d.ts.map +0 -1
  127. package/dist/components/title/title.test.js +0 -18
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { AutoFocusInside } from 'react-focus-on';
4
- import { Button, Card, Checkbox, Disclosure, Elevator, InfoState, Popover, ResponsiveProvider, Select, Stack, Tab, Text, Textfield, Title, } from '../..';
4
+ import { Button, Card, Checkbox, Disclosure, Elevator, InfoState, Popover, ResponsiveProvider, Select, Stack, Tab, Text, Textfield, } from '../..';
5
5
  import { Modal } from './modal';
6
- const longText = (_jsx(Text, { size: 16, children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore cumque voluptate in ut iste reiciendis ipsa nihil accusantium illum ea ullam quasi voluptatibus, reprehenderit maxime placeat laborum, quam debitis, perferendis nemo cum cupiditate dolorem esse. Distinctio excepturi pariatur doloribus, nostrum nesciunt provident. Placeat debitis a odit nesciunt perspiciatis? Nihil aliquam obcaecati ab, quas magni aut suscipit et similique alias nulla repudiandae beatae, aliquid, saepe porro libero officiis ullam cumque quidem eius odio voluptatibus. Reiciendis, vel asperiores? Facilis, provident inventore iure ea a odit suscipit! Aspernatur quae odio neque labore? Quidem esse earum hic excepturi amet sequi porro aperiam eos iste mollitia aut a omnis praesentium sit, asperiores consequatur harum itaque in quam. Quisquam dolores sint eaque dicta quia velit repellat suscipit provident facere repellendus molestias accusantium obcaecati ratione distinctio qui nesciunt totam quas, a ipsum. Possimus exercitationem, velit quibusdam dicta, et quidem dolorum provident voluptatibus facilis quasi nisi incidunt magni quis officia obcaecati laborum perferendis aliquid consequatur itaque corrupti similique ex reprehenderit expedita suscipit. Ipsum quidem possimus doloribus ut, id debitis, officiis, totam assumenda dolore recusandae impedit in tempore neque unde? Repellat necessitatibus in tempora ipsam officiis quam cumque alias. Sed saepe iure ullam, pariatur quo incidunt vero sapiente exercitationem numquam obcaecati suscipit mollitia aspernatur iste esse quia facere magni praesentium! Alias corrupti vitae odit animi magnam ut ad, voluptates hic consequatur dolorum aliquam suscipit quidem assumenda omnis velit, modi commodi exercitationem rerum! Inventore officia, nobis sunt enim quisquam explicabo molestias suscipit esse eaque cumque fugit autem perspiciatis temporibus nisi non. Quae aut nam aliquam accusamus officiis impedit suscipit deleniti ipsa saepe, est facere iusto quam molestias in voluptate error qui porro, veritatis labore iste commodi deserunt ipsum sed? Corrupti unde animi esse deleniti eligendi distinctio, recusandae ratione earum libero sunt nisi impedit repellat aspernatur, quisquam eius iste reiciendis maxime." }));
6
+ const longText = (_jsx(Text, { variant: "body-1", children: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore cumque voluptate in ut iste reiciendis ipsa nihil accusantium illum ea ullam quasi voluptatibus, reprehenderit maxime placeat laborum, quam debitis, perferendis nemo cum cupiditate dolorem esse. Distinctio excepturi pariatur doloribus, nostrum nesciunt provident. Placeat debitis a odit nesciunt perspiciatis? Nihil aliquam obcaecati ab, quas magni aut suscipit et similique alias nulla repudiandae beatae, aliquid, saepe porro libero officiis ullam cumque quidem eius odio voluptatibus. Reiciendis, vel asperiores? Facilis, provident inventore iure ea a odit suscipit! Aspernatur quae odio neque labore? Quidem esse earum hic excepturi amet sequi porro aperiam eos iste mollitia aut a omnis praesentium sit, asperiores consequatur harum itaque in quam. Quisquam dolores sint eaque dicta quia velit repellat suscipit provident facere repellendus molestias accusantium obcaecati ratione distinctio qui nesciunt totam quas, a ipsum. Possimus exercitationem, velit quibusdam dicta, et quidem dolorum provident voluptatibus facilis quasi nisi incidunt magni quis officia obcaecati laborum perferendis aliquid consequatur itaque corrupti similique ex reprehenderit expedita suscipit. Ipsum quidem possimus doloribus ut, id debitis, officiis, totam assumenda dolore recusandae impedit in tempore neque unde? Repellat necessitatibus in tempora ipsam officiis quam cumque alias. Sed saepe iure ullam, pariatur quo incidunt vero sapiente exercitationem numquam obcaecati suscipit mollitia aspernatur iste esse quia facere magni praesentium! Alias corrupti vitae odit animi magnam ut ad, voluptates hic consequatur dolorum aliquam suscipit quidem assumenda omnis velit, modi commodi exercitationem rerum! Inventore officia, nobis sunt enim quisquam explicabo molestias suscipit esse eaque cumque fugit autem perspiciatis temporibus nisi non. Quae aut nam aliquam accusamus officiis impedit suscipit deleniti ipsa saepe, est facere iusto quam molestias in voluptate error qui porro, veritatis labore iste commodi deserunt ipsum sed? Corrupti unde animi esse deleniti eligendi distinctio, recusandae ratione earum libero sunt nisi impedit repellat aspernatur, quisquam eius iste reiciendis maxime." }));
7
7
  const story = {
8
8
  title: 'Dialogs/Modal',
9
9
  component: Modal,
@@ -62,7 +62,7 @@ Confirmation.args = {
62
62
  title: 'Delete account?',
63
63
  subtitle: undefined,
64
64
  hideHeaderBorder: true,
65
- content: _jsx(Text, { size: 16, children: "Are you sure you want to delete your account? This action cannot be undone." }),
65
+ content: _jsx(Text, { variant: "body-1", children: "Are you sure you want to delete your account? This action cannot be undone." }),
66
66
  hideFooterBorder: true,
67
67
  primaryAction: _jsx(Button, { children: "Delete" }),
68
68
  secondaryAction: _jsx(Button, { children: "Cancel" }),
@@ -98,11 +98,11 @@ export const WithAList = DefaultTemplate.bind({});
98
98
  WithAList.args = {
99
99
  title: 'Modal with a list',
100
100
  subtitle: undefined,
101
- content: (_jsxs(Stack, { rowGap: 16, children: [_jsx(Text, { size: 16, children: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt, earum." }), _jsxs("ul", { children: [_jsx("li", { children: _jsx(Text, { size: 16, children: "List item content" }) }), _jsx("li", { children: _jsx(Text, { size: 16, children: "List item content" }) }), _jsx("li", { children: _jsx(Text, { size: 16, children: "List item content" }) })] })] })),
101
+ content: (_jsxs(Stack, { rowGap: 16, children: [_jsx(Text, { variant: "body-1", children: "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Nesciunt, earum." }), _jsxs("ul", { children: [_jsx("li", { children: _jsx(Text, { variant: "body-1", children: "List item content" }) }), _jsx("li", { children: _jsx(Text, { variant: "body-1", children: "List item content" }) }), _jsx("li", { children: _jsx(Text, { variant: "body-1", children: "List item content" }) })] })] })),
102
102
  primaryAction: _jsx(Button, { children: "Primary" }),
103
103
  secondaryAction: _jsx(Button, { children: "Secondary" }),
104
104
  };
105
- const withImageContent = (_jsxs(Stack, { hAlign: "center", vAlign: "center", rowGap: 24, children: [_jsx("img", { src: "https://wonderimages.gumlet.io/placeholders/illustration.png?format=webp&q=100", alt: "modal illustartion", width: "400px", height: "auto" }), _jsxs(Stack, { hAlign: "center", children: [_jsx(Title, { level: "5", children: "Title goes here" }), _jsx(Text, { size: 14, children: "Subtitle goes here" })] })] }));
105
+ const withImageContent = (_jsxs(Stack, { hAlign: "center", vAlign: "center", rowGap: 24, children: [_jsx("img", { src: "https://wonderimages.gumlet.io/placeholders/illustration.png?format=webp&q=100", alt: "modal illustartion", width: "400px", height: "auto" }), _jsxs(Stack, { hAlign: "center", children: [_jsx(Text, { variant: "heading-5", children: "Title goes here" }), _jsx(Text, { variant: "body-2", children: "Subtitle goes here" })] })] }));
106
106
  export const WithImage = DefaultTemplate.bind({});
107
107
  WithImage.args = {
108
108
  title: undefined,
@@ -145,7 +145,7 @@ export const withHeroIcon = DefaultTemplate.bind({});
145
145
  withHeroIcon.args = {
146
146
  title: undefined,
147
147
  subtitle: undefined,
148
- content: (_jsx(InfoState, { title: "Delete user?", direction: "column", icon: "trash-can", iconColor: "red", children: _jsxs(Stack, { hAlign: "center", children: [_jsx(Text, { size: 16, children: "Are you sure you want to delete this user?" }), _jsx(Text, { size: 16, children: "This action cannot be undone." })] }) })),
148
+ content: (_jsx(InfoState, { title: "Delete user?", direction: "column", icon: "trash-can", iconColor: "red", children: _jsxs(Stack, { hAlign: "center", children: [_jsx(Text, { children: "Are you sure you want to delete this user?" }), _jsx(Text, { children: "This action cannot be undone." })] }) })),
149
149
  hideFooterBorder: true,
150
150
  primaryAction: _jsx(Button, { children: "Delete" }),
151
151
  secondaryAction: _jsx(Button, { children: "Cancel" }),
@@ -1 +1 @@
1
- @layer components{.Pagination{list-style:none;margin:0;padding:0}.Pagination,.Pagination>li>a{align-items:center;display:inline-flex}.Pagination>li>a{border-radius:.25rem;color:var(--dimmed-5);cursor:pointer;font-weight:700;height:2rem;justify-content:center;line-height:1;padding:0 .5rem;-webkit-user-select:none;user-select:none}.Pagination>li>a[aria-current=page]{background-color:var(--cta-default);color:var(--cta-foreground)}.Pagination>li>a[aria-disabled=true]{opacity:.5}}
1
+ @layer components{.Pagination{font-size:.875rem;list-style:none;margin:0;padding:0}.Pagination,.Pagination>li>a{align-items:center;display:inline-flex}.Pagination>li>a{border-radius:.25rem;color:var(--dimmed-5);cursor:pointer;font-weight:600;height:2rem;justify-content:center;line-height:1.25rem;min-width:2rem;padding:0 .5rem;-webkit-user-select:none;user-select:none}.Pagination>li>a[aria-current=page]{background-color:var(--cta-default);color:var(--cta-foreground)}.Pagination>li>a[aria-disabled=true]{opacity:.5}}
@@ -23,4 +23,8 @@ export declare const WithElevator: ComponentStory<import("react").ForwardRefExot
23
23
  style?: Record<string, any> | undefined;
24
24
  className?: string | undefined;
25
25
  } & import("./popover").PopoverProps & import("react").RefAttributes<HTMLDivElement>>>;
26
+ export declare const WithCode: ComponentStory<import("react").ForwardRefExoticComponent<{
27
+ style?: Record<string, any> | undefined;
28
+ className?: string | undefined;
29
+ } & import("./popover").PopoverProps & import("react").RefAttributes<HTMLDivElement>>>;
26
30
  //# sourceMappingURL=popover.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"popover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,OAAO,CAgBxC,CAAC;AAEF,eAAe,KAAK,CAAC;AAmCrB,eAAO,MAAM,OAAO;;;sFAA2B,CAAC;AAyBhD,eAAO,MAAM,aAAa;;;sFAA0B,CAAC;AAuBrD,eAAO,MAAM,SAAS;;;sFAA6B,CAAC;AAwCpD,eAAO,MAAM,UAAU;;;sFAA8B,CAAC;AAgBtD,eAAO,MAAM,YAAY;;;sFAAgC,CAAC"}
1
+ {"version":3,"file":"popover.stories.d.ts","sourceRoot":"","sources":["../../../src/components/popover/popover.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMjE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,OAAO,CAgBxC,CAAC;AAEF,eAAe,KAAK,CAAC;AAmCrB,eAAO,MAAM,OAAO;;;sFAA2B,CAAC;AAyBhD,eAAO,MAAM,aAAa;;;sFAA0B,CAAC;AAuBrD,eAAO,MAAM,SAAS;;;sFAA6B,CAAC;AAwCpD,eAAO,MAAM,UAAU;;;sFAA8B,CAAC;AAgBtD,eAAO,MAAM,YAAY;;;sFAAgC,CAAC;AAkC1D,eAAO,MAAM,QAAQ;;;sFAA4B,CAAC"}
@@ -62,3 +62,19 @@ WithElevator.args = {
62
62
  placement: 'auto-end',
63
63
  trigger: _jsx(IconButton, { kind: "flat", icon: "circle-info", iconColor: "var(--cta-default)", dimension: "big", "aria-label": "Show property description" }),
64
64
  };
65
+ const WithCodeTemplate = args => (_jsx(Popover, { ...args, children: _jsx(Elevator, { resting: 2, children: _jsx(Card, { bordered: true, style: { width: '60ch', color: 'var(--global-background)', background: 'var(--dimmed-8)' }, children: _jsx("pre", { style: { whiteSpace: 'pre-wrap' }, children: `{
66
+ productId: '67rJ!B^*S3@izdX*8s26O1y6R6P4iwskG',
67
+ scope: 'main.scope.',
68
+ pipelines: [
69
+ 'Nb9bSzJqcG2%^M8JDWXyYB072%hzGOKA',
70
+ 'Nb9bSzJqcG2%^M8JDWXyYB072%hzGOKA'
71
+ ],
72
+ languages: [
73
+ 'en',
74
+ ],
75
+ }` }) }) }) }));
76
+ export const WithCode = WithCodeTemplate.bind({});
77
+ WithCode.args = {
78
+ placement: 'auto-end',
79
+ trigger: _jsx(IconButton, { kind: "secondary", icon: "circle-info", dimension: "big", "aria-label": "Show some formatted code" }),
80
+ };
@@ -13,6 +13,10 @@ export declare type SelectProps = SelectHTMLAttributes<HTMLSelectElement> & {
13
13
  * Set the accessible label for the select.
14
14
  */
15
15
  label?: ReactNode;
16
+ /**
17
+ * Optional hint text field, it provides additional help or context to the user.
18
+ */
19
+ message?: string;
16
20
  /**
17
21
  * Set how many options can be selected at once.
18
22
  */
@@ -43,6 +47,10 @@ export declare const Select: import("react").ForwardRefExoticComponent<SelectHTM
43
47
  * Set the accessible label for the select.
44
48
  */
45
49
  label?: ReactNode;
50
+ /**
51
+ * Optional hint text field, it provides additional help or context to the user.
52
+ */
53
+ message?: string | undefined;
46
54
  /**
47
55
  * Set how many options can be selected at once.
48
56
  */
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,WAAW,EAAc,SAAS,EAAE,oBAAoB,EACzD,MAAM,OAAO,CAAC;AAGf,OAAO,EACU,WAAW,EAC3B,MAAM,cAAc,CAAC;AAItB,oBAAY,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAClE;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC5D,CAAA;AAED,eAAO,MAAM,MAAM;IA9BjB;;OAEG;cACO,SAAS;IACnB;;OAEG;;IAEH;;OAEG;YACK,SAAS;IACjB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;wBACgB,YAAY,iBAAiB,CAAC,KAAK,IAAI;qDA4D1D,CAAC"}
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,WAAW,EAAc,SAAS,EAAE,oBAAoB,EACzD,MAAM,OAAO,CAAC;AAGf,OAAO,EACU,WAAW,EAC3B,MAAM,cAAc,CAAC;AAItB,oBAAY,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAAG;IAClE;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,KAAK,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC5D,CAAA;AAED,eAAO,MAAM,MAAM;IAlCjB;;OAEG;cACO,SAAS;IACnB;;OAEG;;IAEH;;OAEG;YACK,SAAS;IACjB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;wBACgB,YAAY,iBAAiB,CAAC,KAAK,IAAI;qDAgE1D,CAAC"}
@@ -19,13 +19,13 @@ import { forwardRef, } from 'react';
19
19
  import { useUIDSeed } from 'react-uid';
20
20
  import { Stack, Symbol, Text, } from '../..';
21
21
  import * as styles from './select.module.css';
22
- export const Select = forwardRef(({ children, className, disabled = false, icon = 'chevron-down', label, kind = 'single', dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
22
+ export const Select = forwardRef(({ children, className, disabled = false, icon = 'chevron-down', label, message, kind = 'single', dimension = 'regular', onChange, ...otherProps }, forwardedRef) => {
23
23
  const seedID = useUIDSeed();
24
24
  const iconSizes = {
25
25
  small: 12,
26
26
  regular: 16,
27
27
  big: 24,
28
28
  };
29
- 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", lineHeight: "small", "aria-disabled": disabled, className: styles.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(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] })] }));
29
+ 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", "aria-disabled": disabled, className: styles.Label, variant: dimension === 'big' ? 'body-1' : 'body-2', 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(Symbol, { className: styles.Icon, source: icon, dimension: iconSizes[dimension] }))] }), message && _jsx(Text, { as: "label", "aria-disabled": disabled, className: styles.Label, variant: dimension === 'big' ? 'body-2' : 'body-3', children: message })] }));
30
30
  });
31
31
  Select.displayName = 'Select';
@@ -1 +1 @@
1
- @layer components{.Select{appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.500rem;--field-padding:0.33rem;--font-size:0.875rem}.Select[data-select-dimension=regular]{--field-height:2.500rem;--field-padding:1.000rem;--font-size:1.000rem}.Select[data-select-dimension=big]{--field-height:3.000rem;--field-padding:1.000rem;--font-size:1.125rem}.FieldContainer{color:var(--global-vibrancy-foreground);inline-size:100%;position:relative}.Select[aria-disabled=true] .FieldContainer{color:var(--global-disabled-foreground)}.Field{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:.25rem;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size);margin:0;min-inline-size:100%;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:.5rem 1rem}.Field[multiple] option{color:currentcolor;padding:calc(var(--field-padding)/2) var(--field-padding)}.Field[multiple] option:checked{background:#9ea5b3 linear-gradient(180deg,#9ea5b3 0,#9ea5b3);background-color:#9ea5b3;color:var(--global-background)}.Field[multiple] optgroup{color:currentcolor;font-family:inherit;font-size:inherit;line-height:inherit;margin:0 0 1rem}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;right:calc(var(--field-padding) - var(--field-padding)/3);top:calc(var(--field-height)/2);transform:translateY(-50%)}.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}
1
+ @layer components{.Select{appearance:none;padding:0;position:relative}.Select[data-select-dimension=small]{--field-height:1.500rem;--field-padding:0.33rem;--font-size:0.875rem}.Select[data-select-dimension=regular]{--field-height:2.500rem;--field-padding:1.000rem;--font-size:1rem}.Select[data-select-dimension=big]{--field-height:3.000rem;--field-padding:1.000rem;--font-size:1rem}.FieldContainer{color:var(--global-vibrancy-foreground);inline-size:100%;position:relative}.Select[aria-disabled=true] .FieldContainer{color:var(--global-disabled-foreground)}.Field{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:.25rem;box-sizing:border-box;color:inherit;display:block;font-family:inherit;font-size:var(--font-size);margin:0;min-inline-size:100%;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:.5rem 1rem}.Field[multiple] option{color:currentcolor;padding:calc(var(--field-padding)/2) var(--field-padding)}.Field[multiple] option:checked{background:#9ea5b3 linear-gradient(180deg,#9ea5b3 0,#9ea5b3);background-color:#9ea5b3;color:var(--global-background)}.Field[multiple] optgroup{color:currentcolor;font-family:inherit;font-size:inherit;line-height:inherit;margin:0 0 1rem}.Icon{border-radius:.25rem;pointer-events:none;position:absolute;right:calc(var(--field-padding) - var(--field-padding)/3);top:calc(var(--field-height)/2);transform:translateY(-50%)}.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}
@@ -7,24 +7,27 @@ export declare const Single: ComponentStory<React.ForwardRefExoticComponent<Reac
7
7
  children: React.ReactNode;
8
8
  icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
9
9
  label?: React.ReactNode;
10
+ message?: string | undefined;
10
11
  kind?: "multiple" | "single" | undefined;
11
12
  dimension?: "small" | "regular" | "big" | undefined;
12
13
  disabled?: boolean | undefined;
13
14
  onChange?: ((event: React.ChangeEvent<HTMLSelectElement>) => void) | undefined;
14
15
  } & React.RefAttributes<HTMLSelectElement>>>;
15
- export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
16
+ export declare const Multiple: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
16
17
  children: React.ReactNode;
17
18
  icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
18
19
  label?: React.ReactNode;
20
+ message?: string | undefined;
19
21
  kind?: "multiple" | "single" | undefined;
20
22
  dimension?: "small" | "regular" | "big" | undefined;
21
23
  disabled?: boolean | undefined;
22
24
  onChange?: ((event: React.ChangeEvent<HTMLSelectElement>) => void) | undefined;
23
25
  } & React.RefAttributes<HTMLSelectElement>>>;
24
- export declare const Multiple: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
26
+ export declare const WithLabel: ComponentStory<React.ForwardRefExoticComponent<React.SelectHTMLAttributes<HTMLSelectElement> & {
25
27
  children: React.ReactNode;
26
28
  icon?: import("packages/symbols/dist").SymbolNames | React.ReactElement<HTMLOrSVGElement, string | React.JSXElementConstructor<any>> | undefined;
27
29
  label?: React.ReactNode;
30
+ message?: string | undefined;
28
31
  kind?: "multiple" | "single" | undefined;
29
32
  dimension?: "small" | "regular" | "big" | undefined;
30
33
  disabled?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,MAAM,CA0BvC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgCrB,eAAO,MAAM,MAAM;;;;;;;;4CAA0B,CAAC;AAM9C,eAAO,MAAM,SAAS;;;;;;;;4CAA0B,CAAC;AAOjD,eAAO,MAAM,QAAQ;;;;;;;;4CAA4B,CAAC"}
1
+ {"version":3,"file":"select.stories.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,MAAM,CA4BvC,CAAC;AAEF,eAAe,KAAK,CAAC;AAgCrB,eAAO,MAAM,MAAM;;;;;;;;;4CAA0B,CAAC;AAM9C,eAAO,MAAM,QAAQ;;;;;;;;;4CAA4B,CAAC;AAKlD,eAAO,MAAM,SAAS;;;;;;;;;4CAA0B,CAAC"}
@@ -25,6 +25,8 @@ const story = {
25
25
  },
26
26
  args: {
27
27
  dimension: 'regular',
28
+ label: '',
29
+ message: '',
28
30
  },
29
31
  };
30
32
  export default story;
@@ -35,13 +37,14 @@ Single.args = {
35
37
  disabled: false,
36
38
  kind: 'single',
37
39
  };
40
+ export const Multiple = MultipleTemplate.bind({});
41
+ Multiple.args = {
42
+ kind: 'multiple',
43
+ };
38
44
  export const WithLabel = SingleTemplate.bind({});
39
45
  WithLabel.args = {
40
46
  disabled: false,
41
47
  kind: 'single',
42
48
  label: 'Label',
43
- };
44
- export const Multiple = MultipleTemplate.bind({});
45
- Multiple.args = {
46
- kind: 'multiple',
49
+ message: 'Sample hint text',
47
50
  };
@@ -7,7 +7,7 @@ describe('<Select>', () => {
7
7
  expect(container).not.toBeNull();
8
8
  });
9
9
  test(' it should render properly with props', () => {
10
- const { container } = render(_jsxs(Select, { defaultValue: "placeholder", label: "My Label", dimension: "small", disabled: true, children: [_jsx("option", { value: "placeholder", hidden: true, disabled: true, children: "Pick an option" }), _jsxs("optgroup", { label: "Option Group One", children: [_jsx("option", { value: "1", children: "This is a very long option selected" }), _jsx("option", { value: "2", children: "Option 2" })] }), _jsxs("optgroup", { label: "Option Group Two", children: [_jsx("option", { value: "3", children: "Option 1" }), _jsx("option", { value: "4", children: "Option 2" }), _jsx("option", { value: "5", children: "Option 3" })] })] }));
10
+ const { container } = render(_jsxs(Select, { defaultValue: "placeholder", label: "My Label", message: "test", dimension: "small", disabled: true, children: [_jsx("option", { value: "placeholder", hidden: true, disabled: true, children: "Pick an option" }), _jsxs("optgroup", { label: "Option Group One", children: [_jsx("option", { value: "1", children: "This is a very long option selected" }), _jsx("option", { value: "2", children: "Option 2" })] }), _jsxs("optgroup", { label: "Option Group Two", children: [_jsx("option", { value: "3", children: "Option 1" }), _jsx("option", { value: "4", children: "Option 2" }), _jsx("option", { value: "5", children: "Option 3" })] })] }));
11
11
  expect(container).not.toBeNull();
12
12
  });
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/checkbox.tsx"],"names":[],"mappings":"AAmBA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAOf,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;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAOD,eAAO,MAAM,QAAQ;IA/BnB;;OAEG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDAkFzD,CAAC"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/checkbox.tsx"],"names":[],"mappings":"AAmBA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAOf,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;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAOD,eAAO,MAAM,QAAQ;IA/BnB;;OAEG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDAiFzD,CAAC"}
@@ -37,6 +37,6 @@ export const Checkbox = forwardRef(({ className, disabled, dimension = 'regular'
37
37
  ref.current.indeterminate = indeterminate;
38
38
  }
39
39
  }, [indeterminate]);
40
- return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, vAlign: isAlignCenter ? 'center' : 'start', fill: false, ref: refWrapper, "data-outer-element": "Wrapper", children: [_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: clsx(styles.InputWrapper, className), whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, "data-radio-control": hidden, children: _jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-inner-element": "Checkbox", onChange: onChange, className: styles.CheckboxInput, ref: ref, hidden: hidden, id: fieldID, ...otherProps }) }) }), label && (_jsx(Text, { as: "label", "aria-disabled": disabled, "data-inner-element": "Label", className: styles.Label, lineHeight: dimension === 'small' ? 'small' : 'large', htmlFor: fieldID, size: dimension === 'small' ? 14 : 16, title: otherProps?.title, children: label }))] }));
40
+ return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, vAlign: isAlignCenter ? 'center' : 'start', fill: false, ref: refWrapper, "data-outer-element": "Wrapper", children: [_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: clsx(styles.InputWrapper, className), whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, "data-radio-control": hidden, children: _jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-inner-element": "Checkbox", onChange: onChange, className: styles.CheckboxInput, ref: ref, hidden: hidden, id: fieldID, ...otherProps }) }) }), label && (_jsx(Text, { as: "label", "aria-disabled": disabled, "data-inner-element": "Label", className: styles.Label, htmlFor: fieldID, variant: dimension === 'small' ? 'body-2' : 'body-1', title: otherProps?.title, children: label }))] }));
41
41
  });
42
42
  Checkbox.displayName = 'Checkbox';
@@ -1 +1 @@
1
- {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/radio.tsx"],"names":[],"mappings":"AAmBA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAOf,oBAAY,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAOD,eAAO,MAAM,KAAK;IA1BhB;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDAyEzD,CAAC"}
1
+ {"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/radio.tsx"],"names":[],"mappings":"AAmBA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAOf,oBAAY,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAC/D;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAOD,eAAO,MAAM,KAAK;IA1BhB;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDAwEzD,CAAC"}
@@ -31,6 +31,6 @@ export const Radio = forwardRef(({ className, disabled, id, label, dimension = '
31
31
  const refWrapper = useRef(null);
32
32
  const wrapper = useSize(refWrapper);
33
33
  const isAlignCenter = useMemo(() => wrapper?.height === inputSize[dimension], [wrapper, dimension]);
34
- return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, vAlign: isAlignCenter ? 'center' : 'start', fill: false, ref: refWrapper, "data-outer-element": "Wrapper", children: [_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: clsx(styles.InputWrapper, className), whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, "data-radio-control": hidden, children: _jsx("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-inner-element": "Radio", onChange: onChange, className: styles.RadioInput, ref: forwardedRef, hidden: hidden, id: fieldID, ...otherProps }) }) }), label && (_jsx(Text, { as: "label", "aria-disabled": disabled, "data-inner-element": "Label", className: styles.Label, size: dimension === 'small' ? 14 : 16, lineHeight: dimension === 'small' ? 'small' : 'large', htmlFor: fieldID, title: otherProps?.title, children: label }))] }));
34
+ return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, vAlign: isAlignCenter ? 'center' : 'start', fill: false, ref: refWrapper, "data-outer-element": "Wrapper", children: [_jsx(LazyMotion, { features: domAnimation, strict: true, children: _jsx(m.span, { className: clsx(styles.InputWrapper, className), whileTap: { scale: 1.15 }, transition: { duration: 0.3, ease: 'backOut' }, "data-radio-control": hidden, children: _jsx("input", { type: "radio", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-inner-element": "Radio", onChange: onChange, className: styles.RadioInput, ref: forwardedRef, hidden: hidden, id: fieldID, ...otherProps }) }) }), label && (_jsx(Text, { as: "label", "aria-disabled": disabled, "data-inner-element": "Label", className: styles.Label, variant: dimension === 'small' ? 'body-2' : 'body-1', htmlFor: fieldID, title: otherProps?.title, children: label }))] }));
35
35
  });
36
36
  Radio.displayName = 'Radio';
@@ -1 +1 @@
1
- @layer components{.InputWrapper{cursor:none;display:inline-block;line-height:0}.InputWrapper:hover{cursor:pointer}.InputWrapper[data-radio-control=true]{position:absolute}.CheckboxInput{--w:24px;--h:24px;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:.25rem;box-shadow:0 0 0 1px var(--global-background),inset 0 0 0 1px var(--dimmed-2);color:var(--global-background);cursor:none;inline-size:var(--w);max-block-size:var(--h);max-inline-size:var(--w);position:relative}.CheckboxInput:hover{cursor:pointer}.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);box-shadow:none;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%)}.RadioInput:disabled{box-shadow:none}.RadioInput:indeterminate{background-color:var(--global-vibrancy-background);box-shadow:0 0 0 1px var(--global-background),inset 0 0 0 1px var(--dimmed-2)}.RadioInput:indeterminate:disabled{box-shadow:none}.RadioInput:indeterminate:after{block-size:0}.Toggle{--w:44px;--h:24px;--p:2px;composes:RadioInput;border-radius:200px;color:var(--dimmed-7);min-width:var(--w)}.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;min-width:var(--w)}.Label{cursor:none;word-break:break-word}.Label:hover{cursor:pointer}.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}
1
+ @layer components{.InputWrapper{cursor:none;display:inline-block;line-height:0}.InputWrapper:hover{cursor:pointer}.InputWrapper[data-radio-control=true]{position:absolute}.CheckboxInput{--w:24px;--h:24px;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:.25rem;box-shadow:0 0 0 1px var(--global-background),inset 0 0 0 1px var(--dimmed-2);color:var(--global-background);cursor:none;inline-size:var(--w);max-block-size:var(--h);max-inline-size:var(--w);position:relative}.CheckboxInput:hover{cursor:pointer}.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);box-shadow:none;color:var(--global-disabled-foreground);cursor:not-allowed}.CheckboxInput[data-control-dimension=small]{--w:16px;--h:16px;margin-top:.125rem}.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%)}.RadioInput:disabled{box-shadow:none}.RadioInput:indeterminate{background-color:var(--global-vibrancy-background);box-shadow:0 0 0 1px var(--global-background),inset 0 0 0 1px var(--dimmed-2)}.RadioInput:indeterminate:disabled{box-shadow:none}.RadioInput:indeterminate:after{block-size:0}.Toggle{--w:44px;--h:24px;--p:2px;composes:RadioInput;border-radius:200px;color:var(--dimmed-7);min-width:var(--w)}.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;margin-top:.125rem;min-width:var(--w)}.Label{cursor:none;word-break:break-word}.Label:hover{cursor:pointer}.Label[aria-disabled=true]{color:var(--global-disabled-foreground);cursor:not-allowed}}
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/toggle.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAOf,oBAAY,WAAW,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAChE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAOD,eAAO,MAAM,MAAM;IA1BjB;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDA8DzD,CAAC"}
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/selection-controls/toggle.tsx"],"names":[],"mappings":"AAkBA,OAAO,EACL,WAAW,EAAc,mBAAmB,EAC7C,MAAM,OAAO,CAAC;AAOf,oBAAY,WAAW,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,GAAG;IAChE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC3D,CAAA;AAOD,eAAO,MAAM,MAAM;IA1BjB;;OAEG;;IAEH;;;;OAIG;;IAEH;;OAEG;;IAEH;;;OAGG;wBACgB,YAAY,gBAAgB,CAAC,KAAK,IAAI;oDA6DzD,CAAC"}
@@ -30,6 +30,6 @@ export const Toggle = forwardRef(({ className, disabled, id, label, dimension =
30
30
  const refWrapper = useRef(null);
31
31
  const wrapper = useSize(refWrapper);
32
32
  const isAlignCenter = useMemo(() => wrapper?.height === inputSize[dimension], [wrapper, dimension]);
33
- return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, vAlign: isAlignCenter ? 'center' : 'start', fill: false, ref: refWrapper, "data-outer-element": "Wrapper", children: [_jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-inner-element": "Toggle", onChange: onChange, className: clsx(styles.Toggle, className), ref: forwardedRef, id: fieldID, ...otherProps }), label && (_jsx(Text, { as: "label", "aria-disabled": disabled, "data-inner-element": "Label", className: styles.Label, size: dimension === 'small' ? 14 : 16, lineHeight: dimension === 'small' ? 'small' : 'large', htmlFor: fieldID, title: otherProps?.title, children: label }))] }));
33
+ return (_jsxs(Stack, { as: "span", direction: "row", columnGap: 8, vAlign: isAlignCenter ? 'center' : 'start', fill: false, ref: refWrapper, "data-outer-element": "Wrapper", children: [_jsx("input", { type: "checkbox", disabled: disabled, "aria-disabled": disabled, "data-control-dimension": dimension, "data-inner-element": "Toggle", onChange: onChange, className: clsx(styles.Toggle, className), ref: forwardedRef, id: fieldID, ...otherProps }), label && (_jsx(Text, { as: "label", "aria-disabled": disabled, "data-inner-element": "Label", className: styles.Label, variant: dimension === 'small' ? 'body-2' : 'body-1', htmlFor: fieldID, title: otherProps?.title, children: label }))] }));
34
34
  });
35
35
  Toggle.displayName = 'Toggle';
@@ -1 +1 @@
1
- @layer components{.SkeletonItem{--base-color:var(--dimmed-1);--highlight-color:var(--dimmed-0);--animation-duration:1.5s;--animation-direction:normal;background-color:var(--base-color);border-radius:var(--radius,2rem);display:inline-flex;height:var(--height);line-height:1;overflow:hidden;position:relative;width:var(--width,100%);z-index:1}.SkeletonItem+br+.SkeletonItem{margin-top:var(--gap,0)}.SkeletonItem:after{background-image:linear-gradient(to right,var(--base-color),var(--highlight-color),var(--base-color));background-repeat:no-repeat;content:" ";display:block;height:100%;left:0;position:absolute;right:0;transform:translateX(-100%)}.SkeletonItem[data-skeleton-animated=true]:after{animation-direction:normal;animation-duration:1.5s;animation-iteration-count:infinite;animation-name:skeleton-shimmer;animation-timing-function:ease-in-out}.SkeletonItem[data-skeleton-circle=true]{border-radius:100%}}@keyframes skeleton-shimmer{to{transform:translateX(100%)}}
1
+ @layer components{.SkeletonItem{--base-color:var(--dimmed-1);--highlight-color:var(--dimmed-0);--animation-duration:1.5s;--animation-direction:normal;background-color:var(--base-color);border-radius:var(--radius,2rem);display:inline-flex;height:var(--height);line-height:1rem;overflow:hidden;position:relative;width:var(--width,100%);z-index:1}.SkeletonItem+br+.SkeletonItem{margin-top:var(--gap,0)}.SkeletonItem:after{background-image:linear-gradient(to right,var(--base-color),var(--highlight-color),var(--base-color));background-repeat:no-repeat;content:" ";display:block;height:100%;left:0;position:absolute;right:0;transform:translateX(-100%)}.SkeletonItem[data-skeleton-animated=true]:after{animation-direction:normal;animation-duration:1.5s;animation-iteration-count:infinite;animation-name:skeleton-shimmer;animation-timing-function:ease-in-out}.SkeletonItem[data-skeleton-circle=true]{border-radius:100%}}@keyframes skeleton-shimmer{to{transform:translateX(100%)}}
@@ -1 +1 @@
1
- {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/slider/slider.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACO,mBAAmB,EAChC,MAAM,OAAO,CAAC;AAGf,OAAO,EACU,WAAW,EAC3B,MAAM,cAAc,CAAC;AAItB,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,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,MAAM;IAhDjB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;uBACe,MAAM,KAAK,IAAI;IACjC;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;;OAIG;;oDAsFH,CAAC"}
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/slider/slider.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACO,mBAAmB,EAChC,MAAM,OAAO,CAAC;AAGf,OAAO,EACU,WAAW,EAE3B,MAAM,cAAc,CAAC;AAItB,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,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA;AAED,eAAO,MAAM,MAAM;IAhDjB;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;uBACe,MAAM,KAAK,IAAI;IACjC;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;;;OAIG;;oDAsFH,CAAC"}
@@ -28,6 +28,6 @@ export const Slider = forwardRef(({ min = 0, max = 100, step, onInput, className
28
28
  }, [onInput]);
29
29
  const seedID = useUIDSeed();
30
30
  const fieldID = useMemo(() => id ?? seedID('slider'), [id, seedID]);
31
- return (_jsxs(Stack, { direction: "column", rowGap: 8, children: [label && _jsx(Text, { as: "label", lineHeight: "small", size: isSmall ? 14 : 16, className: styles.Label, "aria-disabled": disabled, htmlFor: fieldID, children: label }), _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, "aria-disabled": disabled, children: min }), (iconMin && !showValues) && (_jsx(Symbol, { source: iconMin, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled })), _jsx("input", { ref: forwardedRef, className: styles.Input, type: "range", min: min, max: max, defaultValue: value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled, step: step, onInput: handleInput, disabled: disabled, id: fieldID, "data-testid": "SliderInput", ...otherProps }), showValues && _jsx(Text, { as: "span", size: isSmall ? 14 : 16, weight: "bold", className: styles.Value, "aria-disabled": disabled, children: max }), showValues && _jsx(Textfield, { readOnly: true, dimension: "small", size: String(max).length, value: value, disabled: disabled }), (iconMax && !showValues) && (_jsx(Symbol, { source: iconMax, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled }))] })] }));
31
+ return (_jsxs(Stack, { direction: "column", rowGap: 4, children: [label && _jsx(Text, { as: "label", variant: isSmall ? 'body-2' : 'body-1', className: styles.Label, "aria-disabled": disabled, htmlFor: fieldID, children: label }), _jsxs(Stack, { direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.Slider, className), "data-slider-dimension": dimension, children: [showValues && _jsx(Text, { as: "span", variant: isSmall ? 'body-2' : 'body-1', textAlign: "end", className: styles.Value, "aria-disabled": disabled, children: _jsx("b", { children: min }) }), (iconMin && !showValues) && (_jsx(Symbol, { source: iconMin, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled })), _jsx("input", { ref: forwardedRef, className: styles.Input, type: "range", min: min, max: max, defaultValue: value, "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-disabled": disabled, step: step, onInput: handleInput, disabled: disabled, id: fieldID, "data-testid": "SliderInput", ...otherProps }), showValues && _jsx(Text, { as: "span", variant: isSmall ? 'body-2' : 'body-1', className: styles.Value, "aria-disabled": disabled, children: _jsx("b", { children: max }) }), showValues && _jsx(Textfield, { readOnly: true, dimension: "small", size: String(max).length, value: value, disabled: disabled }), (iconMax && !showValues) && (_jsx(Symbol, { source: iconMax, dimension: isSmall ? 16 : 24, className: styles.Icon, "aria-disabled": disabled }))] })] }));
32
32
  });
33
33
  Slider.displayName = 'Slider';
@@ -1 +1 @@
1
- {"version":3,"file":"snackbar.d.ts","sourceRoot":"","sources":["../../../src/components/snackbar/snackbar.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACG,WAAW,EAAiB,WAAW,EAEhD,MAAM,cAAc,CAAC;AAItB,oBAAY,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC9D;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAA;AAED,aAAK,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAEpF,eAAO,MAAM,QAAQ,qBA8CI,CAAC"}
1
+ {"version":3,"file":"snackbar.d.ts","sourceRoot":"","sources":["../../../src/components/snackbar/snackbar.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EACG,WAAW,EAAiB,WAAW,EAChD,MAAM,cAAc,CAAC;AAKtB,oBAAY,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC9D;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CAAA;AAED,aAAK,mBAAmB,GAAG,WAAW,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAUpF,eAAO,MAAM,QAAQ,qBAoDI,CAAC"}
@@ -16,8 +16,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  */
17
17
  import clsx from 'clsx';
18
18
  import { forwardRef } from 'react';
19
- import { Button, Stack, Symbol, Text, Title, } from '../..';
19
+ import { Button, Stack, Symbol, Text, } from '../..';
20
20
  import * as styles from './snackbar.module.css';
21
+ const mapping = {
22
+ info: 'informative',
23
+ warning: 'warning',
24
+ neutral: 'neutral',
25
+ positive: 'positive',
26
+ danger: 'danger',
27
+ };
21
28
  export const Snackbar = forwardRef(({ children, className, title, icon, kind = 'neutral', as: Wrapper = 'output', dismissable, dismissLabel = 'Dismiss', onDismiss, ...otherProps }, forwardedRef) => {
22
29
  const defaultIcons = {
23
30
  info: 'circle-info',
@@ -26,5 +33,5 @@ export const Snackbar = forwardRef(({ children, className, title, icon, kind = '
26
33
  positive: 'circle-check',
27
34
  danger: 'circle-x',
28
35
  };
29
- 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, children: [_jsx(Symbol, { className: styles.Icon, weight: "duotone", source: icon ?? defaultIcons[kind], dimension: 18 }), _jsxs(Stack, { rowGap: 16, vPadding: 4, children: [_jsxs(Stack, { rowGap: 8, children: [title && _jsx(Title, { level: "6", responsive: false, children: title }), _jsx(Text, { size: 14, lineHeight: "small", children: children })] }), dismissable && (_jsx(Stack, { hAlign: "end", children: _jsx(Button, { onClick: onDismiss, className: styles.Action, dimension: "small", children: dismissLabel }) }))] })] }) }));
36
+ 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, children: [_jsx(Symbol, { "data-snackbar-has-title": !!title, className: styles.Icon, weight: "duotone", source: icon ?? defaultIcons[kind], dimension: 18 }), _jsxs(Stack, { rowGap: 16, vPadding: 4, children: [_jsxs(Stack, { rowGap: 8, children: [title && _jsx(Text, { variant: "heading-6", color: kind ? mapping[kind] : 'neutral', preventResponsive: true, children: title }), _jsx(Text, { variant: "body-2", children: children })] }), dismissable && (_jsx(Stack, { hAlign: "end", children: _jsx(Button, { onClick: onDismiss, className: styles.Action, dimension: "small", children: dismissLabel }) }))] })] }) }));
30
37
  });
@@ -1 +1 @@
1
- @layer components{.Snackbar{background:var(--global-background);border:1px solid var(--global-vibrancy-background);border-radius:.5rem;display:block;overflow:hidden;padding:.5rem 1rem}.Snackbar p{font-size:1rem}.Snackbar[data-snackbar-kind=neutral]{--heading-foreground:var(--highlight-gray-foreground);--snackbar-bg:var(--highlight-gray-background);--snackbar-fg:var(--highlight-gray-foreground)}.Snackbar[data-snackbar-kind=positive]{--heading-foreground:var(--highlight-green-foreground);--snackbar-bg:var(--highlight-green-background);--snackbar-fg:var(--highlight-green-foreground)}.Snackbar[data-snackbar-kind=warning]{--heading-foreground:var(--highlight-yellow-foreground);--snackbar-bg:var(--highlight-yellow-background);--snackbar-fg:var(--highlight-yellow-foreground)}.Snackbar[data-snackbar-kind=info]{--heading-foreground:var(--highlight-blue-foreground);--snackbar-bg:var(--highlight-blue-background);--snackbar-fg:var(--highlight-blue-foreground)}.Snackbar[data-snackbar-kind=danger]{--heading-foreground:var(--highlight-red-foreground);--snackbar-bg:var(--highlight-red-background);--snackbar-fg:var(--highlight-red-foreground)}.Icon{color:var(--snackbar-fg);flex-grow:0;flex-shrink:0;height:1rem;margin-top:.5rem;max-width:1rem;width:1rem}}@layer overrides{.Action{background-color:var(--snackbar-fg);color:var(--snackbar-bg)}.Action:is(:active,:hover){background-color:var(--snackbar-fg);color:var(--snackbar-bg);opacity:.8}}
1
+ @layer components{.Snackbar{background:var(--global-background);border:1px solid var(--global-vibrancy-background);border-radius:.5rem;display:block;overflow:hidden;padding:.5rem 1rem}.Snackbar p{font-size:1rem}.Snackbar[data-snackbar-kind=neutral]{--heading-foreground:var(--highlight-gray-foreground);--snackbar-bg:var(--highlight-gray-background);--snackbar-fg:var(--highlight-gray-foreground)}.Snackbar[data-snackbar-kind=positive]{--heading-foreground:var(--highlight-green-foreground);--snackbar-bg:var(--highlight-green-background);--snackbar-fg:var(--highlight-green-foreground)}.Snackbar[data-snackbar-kind=warning]{--heading-foreground:var(--highlight-yellow-foreground);--snackbar-bg:var(--highlight-yellow-background);--snackbar-fg:var(--highlight-yellow-foreground)}.Snackbar[data-snackbar-kind=info]{--heading-foreground:var(--highlight-blue-foreground);--snackbar-bg:var(--highlight-blue-background);--snackbar-fg:var(--highlight-blue-foreground)}.Snackbar[data-snackbar-kind=danger]{--heading-foreground:var(--highlight-red-foreground);--snackbar-bg:var(--highlight-red-background);--snackbar-fg:var(--highlight-red-foreground)}.Icon{color:var(--snackbar-fg);flex-grow:0;flex-shrink:0;height:1rem;margin-top:.375rem;max-width:1rem;width:1rem}.Icon[data-snackbar-has-title=true]{margin-top:.625rem}}@layer overrides{.Action{background-color:var(--snackbar-fg);color:var(--snackbar-bg)}.Action:is(:active,:hover){background-color:var(--snackbar-fg);color:var(--snackbar-bg);opacity:.8}}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /*
3
3
  * Copyright 2022-2023 Wonderflow Design Team
4
4
  *
@@ -23,15 +23,15 @@ export const StarMeter = forwardRef(({ className, value = 0, starCount = 5, labe
23
23
  const seedID = useUIDSeed();
24
24
  const properties = useMemo(() => ({
25
25
  small: {
26
- labelSize: 14,
26
+ labelSize: 'body-3',
27
27
  iconSize: 12,
28
28
  },
29
29
  regular: {
30
- labelSize: 16,
30
+ labelSize: 'body-2',
31
31
  iconSize: 16,
32
32
  },
33
33
  big: {
34
- labelSize: 18,
34
+ labelSize: 'body-1',
35
35
  iconSize: 24,
36
36
  },
37
37
  }), []);
@@ -61,5 +61,5 @@ export const StarMeter = forwardRef(({ className, value = 0, starCount = 5, labe
61
61
  return (_jsx(Symbol, { source: "star", weight: "solid", className: styles.Icon, dimension: properties[dimension].iconSize, fill: fillType }, starIndex));
62
62
  });
63
63
  }, [dimension, properties, roundValue]);
64
- return (_jsxs(Stack, { inline: true, direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.StarMeter, className), role: "meter", fill: false, "aria-valuenow": clamp(value, 0, starCount), "aria-valuemin": 0, "aria-valuemax": starCount, "aria-labelledby": seedID('star-meter'), "data-star-meter-dimension": dimension, ref: forwardedRef, ...otherProps, children: [_jsx("svg", { "aria-hidden": "true", className: styles.Gradient, width: "100", height: "50", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("defs", { children: _jsxs("linearGradient", { id: "HalfStar", children: [_jsx("stop", { offset: "0", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50%", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50.1%", style: { stopColor: 'var(--star-dimmed-color)' } }), _jsx("stop", { offset: "100%", style: { stopColor: 'var(--star-dimmed-color)' } })] }) }) }), _jsx(Stack, { direction: "row", columnGap: dimension === 'small' ? 2 : 4, children: starType(starCount, value) }), _jsx(Text, { dimmed: 6, id: seedID('star-meter'), size: properties[dimension].labelSize, weight: "bold", children: !hideLabel && _jsx(_Fragment, { children: label ?? value.toString() }) })] }));
64
+ return (_jsxs(Stack, { inline: true, direction: "row", vAlign: "center", columnGap: 8, className: clsx(styles.StarMeter, className), role: "meter", fill: false, "aria-valuenow": clamp(value, 0, starCount), "aria-valuemin": 0, "aria-valuemax": starCount, "aria-labelledby": seedID('star-meter'), "data-star-meter-dimension": dimension, ref: forwardedRef, ...otherProps, children: [_jsx("svg", { "aria-hidden": "true", className: styles.Gradient, width: "100", height: "50", version: "1.1", xmlns: "http://www.w3.org/2000/svg", children: _jsx("defs", { children: _jsxs("linearGradient", { id: "HalfStar", children: [_jsx("stop", { offset: "0", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50%", style: { stopColor: 'var(--star-color)' } }), _jsx("stop", { offset: "50.1%", style: { stopColor: 'var(--star-dimmed-color)' } }), _jsx("stop", { offset: "100%", style: { stopColor: 'var(--star-dimmed-color)' } })] }) }) }), _jsx(Stack, { direction: "row", columnGap: dimension === 'small' ? 2 : 4, vAlign: "center", children: starType(starCount, value) }), _jsx(Text, { preventResponsive: true, id: seedID('star-meter'), variant: properties[dimension].labelSize, children: _jsx("b", { children: (!hideLabel && label) ?? value.toString() }) })] }));
65
65
  });
@@ -5,7 +5,7 @@ import clsx from 'clsx';
5
5
  import { Children, cloneElement, forwardRef, useMemo, } from 'react';
6
6
  import * as styles from './symbol.module.css';
7
7
  export const Symbol = forwardRef(({ className, source, dimension = 16, weight = 'outline', fill, ...otherProps }, forwardedRef) => {
8
- const computedStyle = useMemo(() => (dimension < 18 ? 'solid' : weight), [weight, dimension]);
8
+ const computedStyle = useMemo(() => (+dimension < 18 ? 'solid' : weight), [weight, dimension]);
9
9
  return (typeof source === 'string')
10
10
  ? (_jsx("svg", { "aria-hidden": "true", width: dimension, height: dimension, fill: fill, className: clsx(styles.Icon, className), ref: forwardedRef, ...otherProps, children: _jsx("use", { href: `${sprite}#${computedStyle}/${source}` }) }))
11
11
  : (_jsx(_Fragment, { children: Children.map(source, (child) => cloneElement(child, {
@@ -1 +1 @@
1
- @layer components{.List{--separator-size:2px;box-shadow:inset 0 calc(var(--separator-size)*-1) 0 var(--dimmed-1);overflow:auto;white-space:nowrap}.Highlight{background:var(--cta-default);border-radius:2px 2px 0 0;bottom:0;height:4px;pointer-events:none;position:absolute;width:100%}.Panel{animation:fade-in .2s;animation-timing-function:cubic-bezier(0,0,.34,1))}}@layer overrides{.Trigger{appearance:none;-webkit-backdrop-filter:none;backdrop-filter:none;background:none;background-color:transparent;block-size:3rem;border:0;border-radius:0;color:var(--dimmed-6);flex-shrink:0;font-family:inherit;font-weight:400;outline-offset:calc(var(--separator-size)*-1);overflow:unset;padding:.5rem 1rem;position:relative;white-space:nowrap}.Trigger[data-tab-dimension=big]{font-size:1.375rem;height:calc(3.5rem - var(--separator-size))}.Trigger:active{transform:none}.Trigger:not([aria-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;color:var(--dimmed-5)}.Trigger.Trigger:not([aria-disabled=true]):is(:hover,:focus,:active){-webkit-backdrop-filter:none;backdrop-filter:none;background:none;color:var(--global-foreground)}.Trigger.Trigger[aria-disabled=true]{-webkit-backdrop-filter:none;backdrop-filter:none;background:none;color:var(--global-disabled-foreground)}.Trigger[data-state=active]{-webkit-text-stroke:.4px var(--global-foreground);color:var(--global-foreground)}}@keyframes fade-in{0%{opacity:0;transform:translate(var(--fade-from-x,0),var(--fade-from-y,0))}to{opacity:unset;transform:none}}
1
+ @layer components{.List{--separator-size:2px;box-shadow:inset 0 calc(var(--separator-size)*-1) 0 var(--dimmed-1);overflow:auto;white-space:nowrap}.Highlight{background:var(--cta-default);border-radius:2px 2px 0 0;bottom:0;height:4px;pointer-events:none;position:absolute;width:100%}.Panel{animation:fade-in .2s;animation-timing-function:cubic-bezier(0,0,.34,1))}}@layer overrides{.Trigger{appearance:none;-webkit-backdrop-filter:none;backdrop-filter:none;background:none;background-color:transparent;block-size:3rem;border:0;border-radius:0;color:var(--dimmed-6);flex-shrink:0;font-family:inherit;font-size:.875rem;font-weight:400;outline-offset:calc(var(--separator-size)*-1);overflow:unset;padding:.5rem 1rem;position:relative;white-space:nowrap}.Trigger[data-tab-dimension=big]{font-size:1rem;height:calc(3.5rem - var(--separator-size))}.Trigger:active{transform:none}.Trigger:not([aria-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;color:var(--dimmed-5)}.Trigger.Trigger:not([aria-disabled=true]):is(:hover,:focus,:active){-webkit-backdrop-filter:none;backdrop-filter:none;background:none;color:var(--global-foreground)}.Trigger.Trigger[aria-disabled=true]{-webkit-backdrop-filter:none;backdrop-filter:none;background:none;color:var(--global-disabled-foreground)}.Trigger[data-state=active]{-webkit-text-stroke:.4px var(--global-foreground);color:var(--global-foreground)}}@keyframes fade-in{0%{opacity:0;transform:translate(var(--fade-from-x,0),var(--fade-from-y,0))}to{opacity:unset;transform:none}}
@@ -1 +1 @@
1
- {"version":3,"file":"tab.stories.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,GAAG,CAOpC,CAAC;AACF,eAAe,KAAK,CAAC;AAarB,eAAO,MAAM,OAAO;;;EAAoB,CAAC;AAEzC,eAAO,MAAM,UAAU;;;EAAoB,CAAC;AAK5C,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,OAAO,GAAG,CAqBtD,CAAC;AAEF,eAAO,MAAM,WAAW;;;EAAoB,CAAC;AAM7C,eAAO,MAAM,cAAc,mBAc1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,OAAO,GAAG,CASlD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cAAc,CAAC,OAAO,GAAG,CAShD,CAAC"}
1
+ {"version":3,"file":"tab.stories.d.ts","sourceRoot":"","sources":["../../../src/components/tab/tab.stories.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIjE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,KAAK,EAAE,aAAa,CAAC,OAAO,GAAG,CAapC,CAAC;AACF,eAAe,KAAK,CAAC;AAarB,eAAO,MAAM,OAAO;;;EAAoB,CAAC;AAEzC,eAAO,MAAM,UAAU;;;EAAoB,CAAC;AAK5C,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,OAAO,GAAG,CAqBtD,CAAC;AAEF,eAAO,MAAM,WAAW;;;EAAoB,CAAC;AAM7C,eAAO,MAAM,cAAc,mBAc1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,cAAc,CAAC,OAAO,GAAG,CASlD,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,cAAc,CAAC,OAAO,GAAG,CAShD,CAAC"}
@@ -9,6 +9,12 @@ const story = {
9
9
  defaultValue: '1',
10
10
  dimension: 'regular',
11
11
  },
12
+ argTypes: {
13
+ dimension: {
14
+ options: ['regular', 'big'],
15
+ control: { type: 'select' },
16
+ },
17
+ },
12
18
  };
13
19
  export default story;
14
20
  const Template = args => (_jsxs(Tab, { ...args, children: [_jsx(Tab.Panel, { value: "1", label: "Tab 1", children: "Panel 1" }), _jsx(Tab.Panel, { value: "2", label: "Tab mid long 2", children: "Panel 2" }), _jsx(Tab.Panel, { value: "3", label: "Tab short 3", children: "Panel 3" }), _jsx(Tab.Panel, { value: "4", label: "Tab veryy long 4", children: "Panel 4" }), _jsx(Tab.Panel, { value: "5", label: "Tab 5", children: "Panel 5" }), _jsx(Tab.Panel, { value: "6", label: "Tab 6", children: "Panel 6" })] }));
@@ -1 +1 @@
1
- @layer components{.TableCell{--indent-guide-width:24px;font-feature-settings:"tnum";word-wrap:break-word;font-variant-numeric:tabular-nums;line-height:1.2;margin:0;max-width:var(--width);padding:0;position:relative;text-align:start}.TableCell:not(:only-child){text-align:var(--text-align,start)}.TableCell[data-table-cell-fixed=true]{width:var(--width,1%)}.TableCell[data-table-cell-collapsed=true]{width:1e-10%}.TableCell[data-table-cell-padding=true]{padding:.75rem .5rem}.HeadCellIcon{margin-inline-start:.5rem}}
1
+ @layer components{.TableCell{--indent-guide-width:24px;font-feature-settings:"tnum";word-wrap:break-word;font-variant-numeric:tabular-nums;line-height:1.25rem;margin:0;max-width:var(--width);padding:0;position:relative;text-align:start}.TableCell:not(:only-child){text-align:var(--text-align,start)}.TableCell[data-table-cell-fixed=true]{width:var(--width,1%)}.TableCell[data-table-cell-collapsed=true]{width:1e-10%}.TableCell[data-table-cell-padding=true]{padding:.75rem .5rem}.HeadCellIcon{margin-inline-start:.5rem}}
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { Polymorphic, Title } from '../../..';
2
+ import { Polymorphic, Text } from '../../..';
3
3
  export declare type TableHeaderProps = HTMLAttributes<HTMLElement> & {
4
- title?: string | Polymorphic.IntrinsicElement<typeof Title>;
4
+ title?: string | Polymorphic.IntrinsicElement<typeof Text>;
5
5
  };
6
6
  export declare const TableHeader: FCChildren<TableHeaderProps>;
7
7
  //# sourceMappingURL=table-header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-header.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-header/table-header.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAS,KAAK,EAAE,MAAM,cAAc,CAAC;AAIzD,oBAAY,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,gBAAgB,CAAC,OAAO,KAAK,CAAC,CAAC;CAC7D,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,gBAAgB,CAuBpD,CAAC"}
1
+ {"version":3,"file":"table-header.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table-header/table-header.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAS,IAAI,EAAE,MAAM,cAAc,CAAC;AAIxD,oBAAY,gBAAgB,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC3D,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,gBAAgB,CAAC,OAAO,IAAI,CAAC,CAAC;CAC5D,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,UAAU,CAAC,gBAAgB,CAuBpD,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Stack, Title } from '../../..';
2
+ import { Stack, Text } from '../../..';
3
3
  import * as styles from './table-header.module.css';
4
- export const TableHeader = ({ children, title, id, ...otherProps }) => (_jsxs(Stack, { direction: "row", columnGap: 32, vAlign: "center", hAlign: "space-between", fill: false, className: styles.TableHeader, ...otherProps, children: [_jsx("div", { children: typeof title === 'string' ? _jsx(Title, { id: id, level: "5", children: title }) : title }), _jsx(Stack, { direction: "row", vAlign: "center", columnGap: 8, inline: true, children: children })] }));
4
+ export const TableHeader = ({ children, title, id, ...otherProps }) => (_jsxs(Stack, { direction: "row", columnGap: 32, vAlign: "center", hAlign: "space-between", fill: false, className: styles.TableHeader, ...otherProps, children: [_jsx("div", { children: typeof title === 'string' ? _jsx(Text, { id: id, variant: "heading-6", color: "dark", children: title }) : title }), _jsx(Stack, { direction: "row", vAlign: "center", columnGap: 8, inline: true, children: children })] }));
@@ -22,7 +22,7 @@ export const TablePagination = ({ children, pageSize, onPageSizeChange, clusters
22
22
  const computedPageCount = useMemo(() => (isManual ? Math.ceil(totalItems / pageSize) : totalPages), [isManual, pageSize, totalItems, totalPages]);
23
23
  const computedItemsInPageStart = useMemo(() => (currentPage && pageSize) && currentPage * pageSize, [currentPage, pageSize]);
24
24
  const computedItemsInPageEnd = useMemo(() => currentPage * pageSize + pageSize, [currentPage, pageSize]);
25
- return (_jsxs(Stack, { fill: false, direction: "row", columnGap: 16, vAlign: "center", hAlign: "end", vPadding: 16, ...otherProps, children: [_jsxs(Stack, { direction: "row", columnGap: 4, children: [_jsx(Text, { as: "label", htmlFor: uid('table-i-per-page'), size: 14, children: "Items per page:" }), _jsx(Select, { value: pageSize, dimension: "small", id: uid('table-i-per-page'), onChange: ({ currentTarget }) => {
25
+ return (_jsxs(Stack, { fill: false, direction: "row", columnGap: 16, vAlign: "center", hAlign: "end", vPadding: 16, ...otherProps, children: [_jsxs(Stack, { direction: "row", columnGap: 4, children: [_jsx(Text, { as: "label", htmlFor: uid('table-i-per-page'), variant: "body-2", children: "Items per page:" }), _jsx(Select, { value: pageSize, dimension: "small", id: uid('table-i-per-page'), onChange: ({ currentTarget }) => {
26
26
  onPageSizeChange?.(Number(currentTarget.value));
27
- }, children: clusters.map(cluster => (_jsx("option", { value: cluster, children: cluster }, cluster))) })] }), _jsx(Text, { "aria-hidden": "true", weight: "bold", size: 14, children: `${computedItemsInPageStart + 1}-${computedItemsInPageEnd > totalItems ? totalItems : computedItemsInPageEnd} of ${totalItems}` }), _jsx(Pagination, { itemsCount: totalItems, itemsPerPage: pageSize, pageCount: computedPageCount, onPageClick: ({ selected }) => onPageClick?.(selected), renderOnZeroPageCount: () => null, forcePage: currentPage })] }));
27
+ }, children: clusters.map(cluster => (_jsx("option", { value: cluster, children: cluster }, cluster))) })] }), _jsx(Text, { "aria-hidden": "true", variant: "body-2", children: _jsx("b", { children: `${computedItemsInPageStart + 1}-${computedItemsInPageEnd > totalItems ? totalItems : computedItemsInPageEnd} of ${totalItems}` }) }), _jsx(Pagination, { itemsCount: totalItems, itemsPerPage: pageSize, pageCount: computedPageCount, onPageClick: ({ selected }) => onPageClick?.(selected), renderOnZeroPageCount: () => null, forcePage: currentPage })] }));
28
28
  };
@@ -20,7 +20,7 @@ import * as styles from './table-row.module.css';
20
20
  export const TableRow = ({ children, className, expanded, rowData, expandedRows, ...otherProps }) => {
21
21
  const shouldHighlightRow = useMemo(() => {
22
22
  const [currentParentRowId] = rowData?.id.match(/.*(?=\.)/) ?? [];
23
- const isHighlight = expandedRows?.includes(currentParentRowId) && expandedRows.every((rowId) => {
23
+ const isHighlight = expandedRows?.includes(currentParentRowId ?? '') && expandedRows.every((rowId) => {
24
24
  const [parentRowMatch] = rowId.match(/.*(?=\.)/) ?? [];
25
25
  return parentRowMatch !== currentParentRowId;
26
26
  });
@@ -140,7 +140,7 @@ export const Table = ({ className, style, columns, data = [], selectableRows, se
140
140
  stiffness: 700,
141
141
  damping: 30,
142
142
  },
143
- }, exit: { y: '-16px', opacity: 0 }, children: [_jsx(Text, { as: "span", size: 14, weight: "bold", children: selectedLabel(Object.keys(selectedRowIdsState)) }), selectedActions?.(Object.keys(selectedRowIdsState))] })), (showHeader || selectableRows) && (_jsx(m.div, { animate: {
143
+ }, exit: { y: '-16px', opacity: 0 }, children: [_jsx(Text, { as: "span", variant: "body-1", children: _jsx("b", { children: selectedLabel(Object.keys(selectedRowIdsState)) }) }), selectedActions?.(Object.keys(selectedRowIdsState))] })), (showHeader || selectableRows) && (_jsx(m.div, { animate: {
144
144
  y: Object.keys(selectedRowIdsState).length ? 20 : 0,
145
145
  opacity: Object.keys(selectedRowIdsState).length ? 0 : 1,
146
146
  transition: {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useMemo, useState, } from 'react';
3
- import { Button, IconButton, Menu, Popover, Stack, Title, } from '../..';
3
+ import { Button, IconButton, Menu, Popover, Stack, Text, } from '../..';
4
4
  import { Table } from './table';
5
5
  const firstData = {
6
6
  firstName: 'Gianni',
@@ -938,7 +938,7 @@ const story = {
938
938
  },
939
939
  };
940
940
  export default story;
941
- const CustomExpandableComponent = ({ data }) => (_jsx(Stack, { vPadding: 16, hPadding: 16, rowGap: 32, children: Object.keys(data).map((item, i) => (_jsxs("div", { style: { background: 'var(--dimmed-1)', padding: 24, minHeight: 50 * (i + 1) }, children: [_jsx(Title, { level: "6", children: typeof data[item] === 'string' ? data[item] : null }), "Lorem ipsum, dolor sit amet consectetur adipisicing elit. Labore, nostrum minima, debitis qui magni voluptatum."] }, item))) }));
941
+ const CustomExpandableComponent = ({ data }) => (_jsx(Stack, { vPadding: 16, hPadding: 16, rowGap: 32, children: Object.keys(data).map((item, i) => (_jsxs("div", { style: { background: 'var(--dimmed-1)', padding: 24, minHeight: 50 * (i + 1) }, children: [_jsx(Text, { variant: "heading-6", children: typeof data[item] === 'string' ? data[item] : null }), "Lorem ipsum, dolor sit amet consectetur adipisicing elit. Labore, nostrum minima, debitis qui magni voluptatum."] }, item))) }));
942
942
  const CustomEmptyComponent = () => (_jsx("div", { title: "No data to show", children: "It seems there is no data to show inside this table. If data should be present,please check if columns are visible by using the table controls." }));
943
943
  const Template = ({ dataWithIds, ...args }) => (_jsx(Table, { emptyComponent: _jsx(CustomEmptyComponent, {}), onRowExpandChange: rows => console.log(rows), ...args }));
944
944
  export const Simple = Template.bind({});
@@ -1,3 +1,3 @@
1
- export type { TextProps } from './text';
1
+ export type { TextProps, TextVariants } from './text';
2
2
  export { Text } from './text';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/text/index.ts"],"names":[],"mappings":"AAgBA,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}