quirk-ui 0.0.6 → 0.0.7
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.
- package/dist/arrow-right-CnuUc2oD.js +25 -0
- package/dist/assets/index.css +1 -1
- package/dist/assets/index.css.d.ts +1 -7
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index10.css.d.ts +5 -2
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index11.css.d.ts +3 -3
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index13.css.d.ts +4 -4
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index16.css.d.ts +1 -4
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index2.css.d.ts +7 -5
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index20.css.d.ts +2 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index21.css.d.ts +15 -4
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index22.css.d.ts +10 -2
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index23.css.d.ts +9 -3
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index24.css.d.ts +6 -3
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index25.css.d.ts +9 -5
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index26.css.d.ts +8 -17
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index27.css.d.ts +10 -5
- package/dist/assets/index28.css +1 -1
- package/dist/assets/index28.css.d.ts +1 -8
- package/dist/assets/index29.css +1 -0
- package/dist/assets/index29.css.d.ts +12 -0
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index3.css.d.ts +3 -4
- package/dist/assets/index30.css +1 -0
- package/dist/assets/index30.css.d.ts +15 -0
- package/dist/assets/index31.css +1 -0
- package/dist/assets/index31.css.d.ts +12 -0
- package/dist/assets/index32.css +1 -0
- package/dist/assets/index32.css.d.ts +14 -0
- package/dist/assets/index33.css +1 -0
- package/dist/assets/index33.css.d.ts +5 -0
- package/dist/assets/index34.css +1 -0
- package/dist/assets/index34.css.d.ts +8 -0
- package/dist/assets/index35.css +1 -0
- package/dist/assets/index35.css.d.ts +6 -0
- package/dist/assets/index36.css +1 -0
- package/dist/assets/index36.css.d.ts +7 -0
- package/dist/assets/index37.css +1 -0
- package/dist/assets/index37.css.d.ts +7 -0
- package/dist/assets/index38.css +1 -0
- package/dist/assets/index38.css.d.ts +6 -0
- package/dist/assets/index39.css +1 -0
- package/dist/assets/index39.css.d.ts +6 -0
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index4.css.d.ts +5 -4
- package/dist/assets/index40.css +1 -0
- package/dist/assets/index40.css.d.ts +7 -0
- package/dist/assets/index41.css +1 -0
- package/dist/assets/index41.css.d.ts +10 -0
- package/dist/assets/index42.css +1 -0
- package/dist/assets/index42.css.d.ts +9 -0
- package/dist/assets/index43.css +1 -0
- package/dist/assets/index43.css.d.ts +20 -0
- package/dist/assets/index44.css +1 -0
- package/dist/assets/index44.css.d.ts +21 -0
- package/dist/assets/index45.css +1 -0
- package/dist/assets/index45.css.d.ts +9 -0
- package/dist/assets/index46.css +1 -0
- package/dist/assets/index46.css.d.ts +12 -0
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index5.css.d.ts +4 -17
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index6.css.d.ts +4 -7
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index7.css.d.ts +17 -2
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index8.css.d.ts +10 -6
- package/dist/assets/index9.css +1 -1
- package/dist/assets/index9.css.d.ts +7 -3
- package/dist/chevron-down-DSUzBz9F.js +11 -0
- package/dist/components/Accordion/Accordion.test.js +45 -0
- package/dist/components/Accordion/index.js +49 -0
- package/dist/components/Alert/Alert.test.js +52 -0
- package/dist/components/Alert/__mocks__/styles.module.css.js +11 -0
- package/dist/components/Alert/index.js +57 -0
- package/dist/components/Avatar/Avatar.test.js +51 -0
- package/dist/components/Avatar/index.js +51 -0
- package/dist/components/Badge/Badge.test.js +62 -0
- package/dist/components/Badge/__mocks__/styles.module.css.js +10 -0
- package/dist/components/Badge/index.js +41 -0
- package/dist/components/Box/Box.test.js +2 -1
- package/dist/components/Button/Button.test.js +2 -1
- package/dist/components/Button/index.js +14 -14
- package/dist/components/ButtonGroup/ButtonGroup.test.js +2 -1
- package/dist/components/ButtonGroup/index.js +11 -11
- package/dist/components/Calendar/Calendar.test.js +5 -4
- package/dist/components/Calendar/index.js +4 -2
- package/dist/components/Card/Card.test.js +49 -0
- package/dist/components/Card/__mocks__/styles.module.css.js +11 -0
- package/dist/components/Card/index.js +77 -0
- package/dist/components/Carousel/Carousel.test.js +41 -0
- package/dist/components/Carousel/index.js +96 -0
- package/dist/components/Checkbox/Checkbox.test.js +2 -1
- package/dist/components/Checkbox/index.js +10 -9
- package/dist/components/Container/Container.test.js +2 -1
- package/dist/components/DatePicker/DatePicker.test.js +3 -2
- package/dist/components/DatePicker/index.js +16 -15
- package/dist/components/Divider/Divider.test.js +10 -9
- package/dist/components/Drawer/Drawer.test.js +35 -0
- package/dist/components/Drawer/__mocks__/styles.module.css.js +9 -0
- package/dist/components/Drawer/index.js +55 -0
- package/dist/components/Fieldset/Fieldset.test.js +3 -2
- package/dist/components/Fieldset/index.js +1 -1
- package/dist/components/FileUpload/FileUpload.test.js +2 -1
- package/dist/components/FileUpload/index.js +4 -3
- package/dist/components/FloatingActionButton/FloatingActionButton.test.js +11 -20
- package/dist/components/Form/Form.test.js +2 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/Grid/Grid.test.js +14 -13
- package/dist/components/Grid/index.js +53 -17
- package/dist/components/Heading/Heading.test.js +2 -1
- package/dist/components/IconButton/IconButton.test.js +10 -9
- package/dist/components/Input/Input.test.js +5 -4
- package/dist/components/Input/index.js +13 -12
- package/dist/components/Label/Label.test.js +2 -1
- package/dist/components/Label/index.js +25 -26
- package/dist/components/Link/Link.test.js +3 -2
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/List.test.js +78 -0
- package/dist/components/List/index.js +24 -0
- package/dist/components/Modal/Modal.test.js +94 -0
- package/dist/components/Modal/index.js +37 -0
- package/dist/components/MultiSelect/MultiSelect.test.js +2 -1
- package/dist/components/MultiSelect/index.js +4 -3
- package/dist/components/NavBar/NavBar.test.js +54 -0
- package/dist/components/NavBar/index.js +139 -0
- package/dist/components/Notification/Notification.test.js +64 -0
- package/dist/components/Notification/__mocks__/styles.module.css.js +9 -0
- package/dist/components/Notification/index.js +61 -0
- package/dist/components/NotificationContainer/NotificationContainer.test.js +28 -0
- package/dist/components/NotificationContainer/index.js +15 -0
- package/dist/components/ProgressBar/ProgressBar.test.js +24 -0
- package/dist/components/ProgressBar/__mocks__/styles.module.css.js +9 -0
- package/dist/components/ProgressBar/index.js +50 -0
- package/dist/components/Radio/Radio.test.js +8 -7
- package/dist/components/Radio/index.js +10 -10
- package/dist/components/Range/Range.test.js +5 -4
- package/dist/components/Range/index.js +13 -12
- package/dist/components/Select/Select.test.js +6 -5
- package/dist/components/Select/index.js +8 -7
- package/dist/components/Skeleton/Skeleton.test.js +26 -0
- package/dist/components/Skeleton/__mocks__/styles.module.css.js +8 -0
- package/dist/components/Skeleton/index.js +34 -0
- package/dist/components/Spacer/Spacer.test.js +2 -1
- package/dist/components/Spacer/index.js +1 -1
- package/dist/components/Spinner/Spinner.test.js +18 -0
- package/dist/components/Spinner/__mocks__/styles.module.css.js +12 -0
- package/dist/components/Spinner/index.js +39 -0
- package/dist/components/Stack/Stack.test.js +2 -1
- package/dist/components/Stack/index.js +1 -1
- package/dist/components/Switch/Switch.test.js +4 -3
- package/dist/components/Switch/index.js +9 -8
- package/dist/components/Table/Table.test.js +2 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/Context.js +11 -0
- package/dist/components/Tabs/Tabs.test.js +49 -0
- package/dist/components/Tabs/__mocks__/styles.module.css.js +8 -0
- package/dist/components/Tabs/index.js +89 -0
- package/dist/components/Text/Text.test.js +2 -1
- package/dist/components/Text/index.js +1 -1
- package/dist/components/Textarea/Textarea.test.js +2 -1
- package/dist/components/Textarea/index.js +13 -12
- package/dist/components/Tooltip/Tooltip.test.js +43 -0
- package/dist/components/Tooltip/index.js +45 -0
- package/dist/{index-BtY6pil2.js → index-BXkubhGb.js} +1 -1
- package/dist/index-Bgo8MuTU.js +4279 -0
- package/dist/{index-DhqFdMqD.js → index-RF23qrF-.js} +172 -190
- package/dist/lib/components/Accordion/Accordion.test.d.ts +0 -0
- package/dist/lib/components/Accordion/index.d.ts +13 -0
- package/dist/lib/components/Alert/Alert.test.d.ts +0 -0
- package/dist/lib/components/Alert/__mocks__/styles.module.css.d.ts +9 -0
- package/dist/lib/components/Alert/index.d.ts +15 -0
- package/dist/lib/components/Avatar/Avatar.test.d.ts +0 -0
- package/dist/lib/components/Avatar/index.d.ts +25 -0
- package/dist/lib/components/Badge/Badge.test.d.ts +0 -0
- package/dist/lib/components/Badge/__mocks__/styles.module.css.d.ts +8 -0
- package/dist/lib/components/Badge/index.d.ts +18 -0
- package/dist/lib/components/Card/Card.test.d.ts +0 -0
- package/dist/lib/components/Card/__mocks__/styles.module.css.d.ts +9 -0
- package/dist/lib/components/Card/index.d.ts +22 -0
- package/dist/lib/components/Carousel/Carousel.test.d.ts +0 -0
- package/dist/lib/components/Carousel/index.d.ts +9 -0
- package/dist/lib/components/Drawer/Drawer.test.d.ts +0 -0
- package/dist/lib/components/Drawer/__mocks__/styles.module.css.d.ts +7 -0
- package/dist/lib/components/Drawer/index.d.ts +19 -0
- package/dist/lib/components/Grid/index.d.ts +9 -1
- package/dist/lib/components/Heading/index.d.ts +0 -2
- package/dist/lib/components/List/List.test.d.ts +1 -0
- package/dist/lib/components/List/index.d.ts +15 -0
- package/dist/lib/components/Modal/Modal.test.d.ts +1 -0
- package/dist/lib/components/Modal/index.d.ts +10 -0
- package/dist/lib/components/NavBar/NavBar.test.d.ts +1 -0
- package/dist/lib/components/NavBar/index.d.ts +16 -0
- package/dist/lib/components/Notification/Notification.test.d.ts +1 -0
- package/dist/lib/components/Notification/__mocks__/styles.module.css.d.ts +7 -0
- package/dist/lib/components/Notification/index.d.ts +17 -0
- package/dist/lib/components/NotificationContainer/NotificationContainer.test.d.ts +1 -0
- package/dist/lib/components/NotificationContainer/index.d.ts +6 -0
- package/dist/lib/components/ProgressBar/ProgressBar.test.d.ts +1 -0
- package/dist/lib/components/ProgressBar/__mocks__/styles.module.css.d.ts +7 -0
- package/dist/lib/components/ProgressBar/index.d.ts +15 -0
- package/dist/lib/components/Skeleton/Skeleton.test.d.ts +1 -0
- package/dist/lib/components/Skeleton/__mocks__/styles.module.css.d.ts +6 -0
- package/dist/lib/components/Skeleton/index.d.ts +15 -0
- package/dist/lib/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/lib/components/Spinner/__mocks__/styles.module.css.d.ts +10 -0
- package/dist/lib/components/Spinner/index.d.ts +20 -0
- package/dist/lib/components/Tabs/Context.d.ts +10 -0
- package/dist/lib/components/Tabs/Tabs.test.d.ts +0 -0
- package/dist/lib/components/Tabs/__mocks__/styles.module.css.d.ts +6 -0
- package/dist/lib/components/Tabs/index.d.ts +27 -0
- package/dist/lib/components/Tooltip/Tooltip.test.d.ts +0 -0
- package/dist/lib/components/Tooltip/index.d.ts +16 -0
- package/dist/lib/main.d.ts +19 -0
- package/dist/lib/utils/NotificationManager/NotificationManager.test.d.ts +1 -0
- package/dist/lib/utils/NotificationManager/index.d.ts +10 -0
- package/dist/lib/utils/ThemeProvider/index.d.ts +7 -0
- package/dist/main.js +78 -44
- package/dist/plus-Cs7TaIK9.js +14 -0
- package/dist/utils/NotificationManager/NotificationManager.test.js +34 -0
- package/dist/utils/NotificationManager/index.js +70 -0
- package/dist/utils/RenderAsRichtext.tsx/index.js +5 -0
- package/dist/utils/ThemeProvider/index.js +13 -0
- package/dist/vi.B-PuvDzu-a048kFcX.js +41965 -0
- package/dist/x-CnsEH4Ox.js +14 -0
- package/package.json +3 -2
- package/dist/index-BWTAh3RO.js +0 -57529
- /package/dist/lib/utils/{renderRichText.d.ts → RenderAsRichtext.tsx/index.d.ts} +0 -0
- /package/dist/utils/{renderRichText.js → RenderAsRichtext.js} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
4
|
-
readonly "
|
|
5
|
-
readonly "
|
|
2
|
+
readonly "_default_17qk6_55": string;
|
|
3
|
+
readonly "_lead_17qk6_63": string;
|
|
4
|
+
readonly "_muted_17qk6_59": string;
|
|
5
|
+
readonly "_small_17qk6_68": string;
|
|
6
|
+
readonly "_text_17qk6_1": string;
|
|
6
7
|
};
|
|
7
8
|
export = styles;
|
|
8
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_13tha_1{display:flex;flex-direction:column;position:relative}._input_13tha_7{padding:var(--spacing-sm) var(--spacing-sm);border:2px solid var(--color-border, #ccc);border-radius:var(--radius-md);font-size:var(--font-size-md);outline:none;background-color:var(--color-background);color:var(--color-text-primary)}._input_13tha_7::placeholder{color:var(--color-muted)}._input_13tha_7:focus{border-color:var(--color-primary)}._popover_13tha_25{position:absolute;top:100%;left:0;z-index:10;border-radius:var(--radius-md);background-color:var(--color-background);border:1px solid var(--color-border);margin-top:var(--spacing-xs)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_7toxm_1{display:flex;flex-direction:column;gap:var(--spacing-sm)}._trackContainer_7toxm_7{display:flex;align-items:center;gap:var(--spacing-sm)}._track_7toxm_7{flex:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;background-color:var(--color-muted);border-radius:4px;outline:none}._track_7toxm_7::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;background-color:var(--color-primary);border-radius:var(--radius-full);cursor:pointer;border:none}._track_7toxm_7::-moz-range-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;background-color:var(--color-primary);border-radius:var(--radius-full);cursor:pointer;border:none}._value_7toxm_44{width:2rem;text-align:right;font-size:var(--font-size-sm);font-weight:var(--font-weight-bold);color:var(--color-primary)}._error_7toxm_52{color:var(--color-error)}._errorMessage_7toxm_56{font-size:var(--font-size-sm);color:var(--color-error)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "_errorMessage_7toxm_56": string;
|
|
3
|
+
readonly "_error_7toxm_52": string;
|
|
4
|
+
readonly "_trackContainer_7toxm_7": string;
|
|
5
|
+
readonly "_track_7toxm_7": string;
|
|
6
|
+
readonly "_value_7toxm_44": string;
|
|
7
|
+
readonly "_wrapper_7toxm_1": string;
|
|
8
|
+
};
|
|
9
|
+
export = styles;
|
|
10
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._wrapper_s8dew_1{display:flex;flex-direction:column;gap:var(--spacing-sm)}._dropZone_s8dew_7{border:2px dashed var(--color-border);border-radius:var(--radius-md);padding:var(--spacing-xl);text-align:center;cursor:pointer;background-color:var(--color-background);transition:background-color .3s ease}._dropZone_s8dew_7 p{color:var(--color-text-primary)}._dropZone_s8dew_7:hover{background-color:var(--color-background)}._dragging_s8dew_25{background-color:var(--color-primary);border-color:var(--color-primary)}._input_s8dew_30{display:none}._fileList_s8dew_34{display:flex;flex-direction:column;gap:var(--spacing-sm);margin-top:var(--spacing-md);list-style:none;padding:0}._fileList_s8dew_34 li{color:var(--color-text-primary);display:flex;align-items:center;gap:var(--spacing-sm)}._fileList_s8dew_34 li button{cursor:pointer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--nav-height: 65px}._navbar_1u7z9_5{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%;background-color:var(--color-background);border-bottom:1px solid var(--color-border);padding:0 var(--spacing-md);position:relative;z-index:1000;height:var(--nav-height)}._sticky_1u7z9_19{position:sticky;top:0;width:100%}._container_1u7z9_25{display:flex;align-items:center;justify-content:space-between;width:100%;height:100%;max-width:1280px;margin:0 auto}._logo_1u7z9_35{font-size:var(--font-size-lg);font-weight:var(--font-weight-bold);color:var(--color-primary)}._menuToggle_1u7z9_41{background:none;border:none;cursor:pointer;display:none;color:var(--color-text-primary);z-index:1100}._nav_1u7z9_5{display:flex;gap:var(--spacing-lg);height:100%;transition:transform .3s ease}._linkWrapper_1u7z9_57{position:relative;display:flex;align-items:center}._linkItem_1u7z9_63{display:flex;align-items:center;box-sizing:border-box}._sublinkToggle_1u7z9_71,._link_1u7z9_57{text-decoration:none;color:var(--color-text-primary);padding:var(--padding-sm);transition:color .3s ease;font-weight:var(--font-weight-semibold);font-size:var(--font-size-md);box-sizing:border-box}._link_1u7z9_57:hover,._sublinkToggle_1u7z9_71:hover,._navItem_1u7z9_87:hover{color:var(--color-primary)}._sublinkToggle_1u7z9_71{background:none;border:none;display:flex;align-items:center;cursor:pointer;color:var(--color-text-primary)}._sublinks_1u7z9_101{position:absolute;right:0;top:100%;background-color:var(--color-background);box-shadow:0 6px 8px #0000001a;overflow:hidden;max-height:0;min-width:100%;width:max-content;opacity:0;z-index:100;transition:max-height .3s ease,opacity .3s ease;display:none;flex-direction:column;align-items:flex-end;gap:var(--spacing-md);padding:var(--spacing-md);border-radius:0 0 var(--radius-md) var(--radius-md);pointer-events:none}._sublinks_1u7z9_101._show_1u7z9_123{display:flex;max-height:500px;opacity:1;pointer-events:auto}._chevron_1u7z9_130{transition:transform .3s ease}._sublinkToggle_1u7z9_71._open_1u7z9_134 ._chevron_1u7z9_130{transform:rotate(180deg)}@media (max-width: 768px){._menuToggle_1u7z9_41{display:flex;align-items:center;justify-content:center}._nav_1u7z9_5{display:none;position:fixed;top:calc(var(--nav-height) - 1px);left:0;width:100%;height:100%;background-color:var(--color-background);display:flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-md);padding:var(--spacing-md);border-top:1px solid var(--color-border);z-index:1000;overflow-y:auto;transform:translate(100%)}._nav_1u7z9_5._open_1u7z9_134{transform:translate(0)}._linkWrapper_1u7z9_57{flex-direction:column;width:100%;max-width:300px;margin:0 auto;padding:var(--spacing-sm) 0}._linkWrapper_1u7z9_57._parent_1u7z9_176{border-bottom:1px solid var(--color-border)}._linkWrapper_1u7z9_57._parent_1u7z9_176:last-of-type{border:none}._linkItem_1u7z9_63{width:100%}._chevron_1u7z9_130{display:none}._sublinks_1u7z9_101{position:relative;top:0;box-shadow:none;max-height:fit-content;opacity:1;align-items:flex-start;padding:var(--spacing-sm);gap:0;pointer-events:auto}._sublinkToggle_1u7z9_71{cursor:pointer;pointer-events:none;color:var(--color-muted)}}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "_chevron_1u7z9_130": string;
|
|
3
|
+
readonly "_container_1u7z9_25": string;
|
|
4
|
+
readonly "_linkItem_1u7z9_63": string;
|
|
5
|
+
readonly "_linkWrapper_1u7z9_57": string;
|
|
6
|
+
readonly "_link_1u7z9_57": string;
|
|
7
|
+
readonly "_logo_1u7z9_35": string;
|
|
8
|
+
readonly "_menuToggle_1u7z9_41": string;
|
|
9
|
+
readonly "_navItem_1u7z9_87": string;
|
|
10
|
+
readonly "_nav_1u7z9_5": string;
|
|
11
|
+
readonly "_navbar_1u7z9_5": string;
|
|
12
|
+
readonly "_open_1u7z9_134": string;
|
|
13
|
+
readonly "_parent_1u7z9_176": string;
|
|
14
|
+
readonly "_show_1u7z9_123": string;
|
|
15
|
+
readonly "_sticky_1u7z9_19": string;
|
|
16
|
+
readonly "_sublinkToggle_1u7z9_71": string;
|
|
17
|
+
readonly "_sublinks_1u7z9_101": string;
|
|
18
|
+
};
|
|
19
|
+
export = styles;
|
|
20
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._label_15ngo_1{font-weight:var(--font-weight-semibold);margin-bottom:var(--spacing-xs)}._text_15ngo_6{display:inline-flex;align-items:center;gap:var(--spacing-xs)}._sm_15ngo_13{font-size:.75rem}._md_15ngo_17{font-size:.875rem}._lg_15ngo_21{font-size:1rem}._default_15ngo_26{color:var(--color-text-primary)}._muted_15ngo_30{color:var(--color-muted)}._accent_15ngo_34{color:var(--color-primary)}._disabled_15ngo_38{color:var(--color-muted)}._error_15ngo_42{color:var(--color-error)}._required_15ngo_47{color:var(--color-error);margin-left:.25rem}._optional_15ngo_52{color:var(--color-muted);font-style:italic;margin-left:.25rem}._srOnly_15ngo_58{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}._icon_15ngo_71{line-height:0;margin-left:var(--spacing-xs)}._tooltipWrapper_15ngo_77{position:relative;display:inline-flex;align-items:center}._tooltipIcon_15ngo_83{line-height:0;font-size:var(--font-size-md);cursor:help;margin-left:var(--spacing-xs);color:var(--color-muted)}._tooltipText_15ngo_91{visibility:hidden;background-color:#111;color:#fff;text-align:center;padding:var(--spacing-xs) var(--spacing-sm);border-radius:var(--radius-md);position:absolute;z-index:10;bottom:125%;left:50%;transform:translate(-50%);font-size:var(--font-size-xs);white-space:nowrap;opacity:0;transition:opacity .2s ease}._tooltipWrapper_15ngo_77:hover ._tooltipText_15ngo_91,._tooltipWrapper_15ngo_77:focus-within ._tooltipText_15ngo_91{visibility:visible;opacity:1}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "_accent_15ngo_34": string;
|
|
3
|
+
readonly "_default_15ngo_26": string;
|
|
4
|
+
readonly "_disabled_15ngo_38": string;
|
|
5
|
+
readonly "_error_15ngo_42": string;
|
|
6
|
+
readonly "_icon_15ngo_71": string;
|
|
7
|
+
readonly "_label_15ngo_1": string;
|
|
8
|
+
readonly "_lg_15ngo_21": string;
|
|
9
|
+
readonly "_md_15ngo_17": string;
|
|
10
|
+
readonly "_muted_15ngo_30": string;
|
|
11
|
+
readonly "_optional_15ngo_52": string;
|
|
12
|
+
readonly "_required_15ngo_47": string;
|
|
13
|
+
readonly "_sm_15ngo_13": string;
|
|
14
|
+
readonly "_srOnly_15ngo_58": string;
|
|
15
|
+
readonly "_text_15ngo_6": string;
|
|
16
|
+
readonly "_tooltipIcon_15ngo_83": string;
|
|
17
|
+
readonly "_tooltipText_15ngo_91": string;
|
|
18
|
+
readonly "_tooltipWrapper_15ngo_77": string;
|
|
19
|
+
};
|
|
20
|
+
export = styles;
|
|
21
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._link_98em4_1{color:var(--color-link);text-decoration:none;display:inline-flex;align-items:center;gap:.25rem}._default_98em4_9{color:var(--color-link)}._muted_98em4_13{color:var(--color-muted)}._underline_98em4_17{text-decoration:underline}._icon_98em4_21{display:inline-flex}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._calendar_zbxci_1{padding:var(--spacing-sm);border-radius:var(--radius-md);min-width:250px}._header_zbxci_7{display:flex;justify-content:space-between;margin-bottom:var(--spacing-sm)}._dayName_zbxci_13{font-weight:var(--font-weight-semibold);color:var(--color-text-primary);width:30px;text-align:center;flex:1;font-size:var(--font-size-sm)}._monthName_zbxci_23{font-weight:var(--font-weight-bold);color:var(--color-text-primary)}._week_zbxci_28{display:flex;justify-content:space-between;color:var(--color-text-primary)}._cell_zbxci_34{flex:1;padding:var(--spacing-xs) 0;text-align:center;background:none;color:var(--color-text-primary);border:none;cursor:pointer;width:30px}._outside_zbxci_45{color:var(--color-muted)}._selected_zbxci_49{background-color:var(--color-primary);color:#fff;border-radius:var(--radius-md)}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const styles: {
|
|
2
|
+
readonly "_calendar_zbxci_1": string;
|
|
3
|
+
readonly "_cell_zbxci_34": string;
|
|
4
|
+
readonly "_dayName_zbxci_13": string;
|
|
5
|
+
readonly "_header_zbxci_7": string;
|
|
6
|
+
readonly "_monthName_zbxci_23": string;
|
|
7
|
+
readonly "_outside_zbxci_45": string;
|
|
8
|
+
readonly "_selected_zbxci_49": string;
|
|
9
|
+
readonly "_week_zbxci_28": string;
|
|
10
|
+
};
|
|
11
|
+
export = styles;
|
|
12
|
+
|
package/dist/assets/index5.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._wrapper_g45ha_1{overflow-x:auto}._table_g45ha_5{width:100%;border-collapse:collapse;font-size:var(--font-size-sm)}th,td{padding:var(--spacing-xs);text-align:left;border-bottom:1px solid var(--color-border);color:var(--color-text-primary)}th{background-color:var(--color-secondary);font-weight:var(--font-weight-semibold)}._empty_g45ha_24{text-align:center;padding:var(--spacing-md);color:var(--color-text-primary)}._clickableRow_g45ha_30{cursor:pointer}._clickableRow_g45ha_30:hover{background-color:var(--color-primary)}
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
4
|
-
readonly "
|
|
5
|
-
readonly "
|
|
6
|
-
readonly "_gapLg_134u6_26": string;
|
|
7
|
-
readonly "_gapMd_134u6_22": string;
|
|
8
|
-
readonly "_gapSm_134u6_18": string;
|
|
9
|
-
readonly "_horizontal_134u6_9": string;
|
|
10
|
-
readonly "_justifyCenter_134u6_52": string;
|
|
11
|
-
readonly "_justifyEnd_134u6_56": string;
|
|
12
|
-
readonly "_justifySpaceAround_134u6_64": string;
|
|
13
|
-
readonly "_justifySpaceBetween_134u6_60": string;
|
|
14
|
-
readonly "_justifySpaceEvenly_134u6_68": string;
|
|
15
|
-
readonly "_justifyStart_134u6_48": string;
|
|
16
|
-
readonly "_stack_134u6_1": string;
|
|
17
|
-
readonly "_vertical_134u6_5": string;
|
|
18
|
-
readonly "_wrap_134u6_13": string;
|
|
2
|
+
readonly "_clickableRow_g45ha_30": string;
|
|
3
|
+
readonly "_empty_g45ha_24": string;
|
|
4
|
+
readonly "_table_g45ha_5": string;
|
|
5
|
+
readonly "_wrapper_g45ha_1": string;
|
|
19
6
|
};
|
|
20
7
|
export = styles;
|
|
21
8
|
|
package/dist/assets/index6.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._wrapper_fzy93_1{display:flex;align-items:center;gap:var(--spacing-sm)}._input_fzy93_7{display:none}._slider_fzy93_11{position:relative;width:2.5rem;height:1.25rem;background-color:var(--color-muted);border-radius:var(--radius-full);transition:background-color .3s}._slider_fzy93_11:before{content:"";position:absolute;top:2px;left:2px;width:1rem;height:1rem;background-color:var(--color-background);border-radius:50%;transition:transform .3s}._input_fzy93_7:checked+._slider_fzy93_11{background-color:var(--color-primary)}._input_fzy93_7:checked+._slider_fzy93_11:before{transform:translate(1.25rem)}label,._label_fzy93_41{margin-bottom:0!important}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
4
|
-
readonly "
|
|
5
|
-
readonly "
|
|
6
|
-
readonly "_spacer_1pz5u_1": string;
|
|
7
|
-
readonly "_vertical_1pz5u_11": string;
|
|
8
|
-
readonly "_xl_1pz5u_31": string;
|
|
2
|
+
readonly "_input_fzy93_7": string;
|
|
3
|
+
readonly "_label_fzy93_41": string;
|
|
4
|
+
readonly "_slider_fzy93_11": string;
|
|
5
|
+
readonly "_wrapper_fzy93_1": string;
|
|
9
6
|
};
|
|
10
7
|
export = styles;
|
|
11
8
|
|
package/dist/assets/index7.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._stack_134u6_1{display:flex}._vertical_134u6_5{flex-direction:column}._horizontal_134u6_9{flex-direction:row}._wrap_134u6_13{flex-wrap:wrap}._gapSm_134u6_18{gap:var(--spacing-sm)}._gapMd_134u6_22{gap:var(--spacing-md)}._gapLg_134u6_26{gap:var(--spacing-xl)}._alignStart_134u6_31{align-items:flex-start}._alignCenter_134u6_35{align-items:center}._alignEnd_134u6_39{align-items:flex-end}._alignStretch_134u6_43{align-items:stretch}._justifyStart_134u6_48{justify-content:flex-start}._justifyCenter_134u6_52{justify-content:center}._justifyEnd_134u6_56{justify-content:flex-end}._justifySpaceBetween_134u6_60{justify-content:space-between}._justifySpaceAround_134u6_64{justify-content:space-around}._justifySpaceEvenly_134u6_68{justify-content:space-evenly}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
2
|
+
readonly "_alignCenter_134u6_35": string;
|
|
3
|
+
readonly "_alignEnd_134u6_39": string;
|
|
4
|
+
readonly "_alignStart_134u6_31": string;
|
|
5
|
+
readonly "_alignStretch_134u6_43": string;
|
|
6
|
+
readonly "_gapLg_134u6_26": string;
|
|
7
|
+
readonly "_gapMd_134u6_22": string;
|
|
8
|
+
readonly "_gapSm_134u6_18": string;
|
|
9
|
+
readonly "_horizontal_134u6_9": string;
|
|
10
|
+
readonly "_justifyCenter_134u6_52": string;
|
|
11
|
+
readonly "_justifyEnd_134u6_56": string;
|
|
12
|
+
readonly "_justifySpaceAround_134u6_64": string;
|
|
13
|
+
readonly "_justifySpaceBetween_134u6_60": string;
|
|
14
|
+
readonly "_justifySpaceEvenly_134u6_68": string;
|
|
15
|
+
readonly "_justifyStart_134u6_48": string;
|
|
16
|
+
readonly "_stack_134u6_1": string;
|
|
17
|
+
readonly "_vertical_134u6_5": string;
|
|
18
|
+
readonly "_wrap_134u6_13": string;
|
|
4
19
|
};
|
|
5
20
|
export = styles;
|
|
6
21
|
|
package/dist/assets/index8.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._spinner_sf4mt_1{display:inline-flex;align-items:center;justify-content:center;position:relative}._small_sf4mt_8{width:24px;height:24px}._medium_sf4mt_13{width:48px;height:48px}._large_sf4mt_18{width:72px;height:72px}._prong_sf4mt_23{width:8%;height:30%;background-color:currentColor;border-radius:4px;position:absolute;top:67%;transform-origin:center -55%;animation:_fade_sf4mt_1 1s linear infinite}._primary_sf4mt_34{color:var(--color-primary)}._success_sf4mt_38{color:var(--color-success)}._warning_sf4mt_42{color:var(--color-warning)}._danger_sf4mt_46{color:var(--color-error)}@keyframes _fade_sf4mt_1{0%{opacity:1}to{opacity:.2}}._prong_sf4mt_23:nth-child(1){transform:rotate(0);animation-delay:-.9s}._prong_sf4mt_23:nth-child(2){transform:rotate(36deg);animation-delay:-.8s}._prong_sf4mt_23:nth-child(3){transform:rotate(72deg);animation-delay:-.7s}._prong_sf4mt_23:nth-child(4){transform:rotate(108deg);animation-delay:-.6s}._prong_sf4mt_23:nth-child(5){transform:rotate(144deg);animation-delay:-.5s}._prong_sf4mt_23:nth-child(6){transform:rotate(180deg);animation-delay:-.4s}._prong_sf4mt_23:nth-child(7){transform:rotate(216deg);animation-delay:-.3s}._prong_sf4mt_23:nth-child(8){transform:rotate(252deg);animation-delay:-.2s}._prong_sf4mt_23:nth-child(9){transform:rotate(288deg);animation-delay:-.1s}._prong_sf4mt_23:nth-child(10){transform:rotate(324deg);animation-delay:0s}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
4
|
-
readonly "
|
|
5
|
-
readonly "
|
|
6
|
-
readonly "
|
|
7
|
-
readonly "
|
|
2
|
+
readonly "_danger_sf4mt_46": string;
|
|
3
|
+
readonly "_fade_sf4mt_1": string;
|
|
4
|
+
readonly "_large_sf4mt_18": string;
|
|
5
|
+
readonly "_medium_sf4mt_13": string;
|
|
6
|
+
readonly "_primary_sf4mt_34": string;
|
|
7
|
+
readonly "_prong_sf4mt_23": string;
|
|
8
|
+
readonly "_small_sf4mt_8": string;
|
|
9
|
+
readonly "_spinner_sf4mt_1": string;
|
|
10
|
+
readonly "_success_sf4mt_38": string;
|
|
11
|
+
readonly "_warning_sf4mt_42": string;
|
|
8
12
|
};
|
|
9
13
|
export = styles;
|
|
10
14
|
|
package/dist/assets/index9.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._spacer_1pz5u_1{flex-shrink:0;background:none}._horizontal_1pz5u_6{width:100%;height:auto}._vertical_1pz5u_11{height:100%;width:auto}._sm_1pz5u_16{height:.5rem;width:.5rem}._md_1pz5u_21{height:1rem;width:1rem}._lg_1pz5u_26{height:2rem;width:2rem}._xl_1pz5u_31{height:3rem;width:3rem}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
declare const styles: {
|
|
2
|
-
readonly "
|
|
3
|
-
readonly "
|
|
4
|
-
readonly "
|
|
2
|
+
readonly "_horizontal_1pz5u_6": string;
|
|
3
|
+
readonly "_lg_1pz5u_26": string;
|
|
4
|
+
readonly "_md_1pz5u_21": string;
|
|
5
|
+
readonly "_sm_1pz5u_16": string;
|
|
6
|
+
readonly "_spacer_1pz5u_1": string;
|
|
7
|
+
readonly "_vertical_1pz5u_11": string;
|
|
8
|
+
readonly "_xl_1pz5u_31": string;
|
|
5
9
|
};
|
|
6
10
|
export = styles;
|
|
7
11
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { c as o } from "./createLucideIcon-C8GTh_Qx.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license lucide-react v0.488.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
const n = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], e = o("chevron-down", n);
|
|
9
|
+
export {
|
|
10
|
+
e as C
|
|
11
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { d, i as m, r, g as t, s as e, f as s } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Accordion as a } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
d("Accordion", () => {
|
|
6
|
+
const l = [
|
|
7
|
+
{
|
|
8
|
+
id: "item1",
|
|
9
|
+
title: "Title 1",
|
|
10
|
+
content: "Content 1"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "item2",
|
|
14
|
+
title: "Title 2",
|
|
15
|
+
content: "Content 2"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "item3",
|
|
19
|
+
title: "Title 3",
|
|
20
|
+
content: "Content 3"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
m("renders accordion items", () => {
|
|
24
|
+
r(/* @__PURE__ */ c(a, { items: l, multiple: !0 })), t(e.getByText("Title 1")).toBeInTheDocument(), t(e.getByText("Title 2")).toBeInTheDocument(), t(e.getByText("Title 3")).toBeInTheDocument();
|
|
25
|
+
}), m("only one item is expanded at a time when multiple is false", () => {
|
|
26
|
+
r(/* @__PURE__ */ c(a, { items: l, multiple: !1 }));
|
|
27
|
+
const i = e.getByText("Title 1"), n = e.getByText("Content 1"), o = e.getByText("Title 2"), T = e.getByText("Content 2");
|
|
28
|
+
s.click(i), t(n).toBeVisible(), s.click(o), setTimeout(() => {
|
|
29
|
+
t(T).toBeVisible(), t(n).not.toBeVisible();
|
|
30
|
+
}, 400);
|
|
31
|
+
}), m("multiple items can be expanded when multiple is true", () => {
|
|
32
|
+
r(/* @__PURE__ */ c(a, { items: l, multiple: !1 }));
|
|
33
|
+
const i = e.getByText("Title 1"), n = e.getByText("Content 1"), o = e.getByText("Title 2"), T = e.getByText("Content 2");
|
|
34
|
+
s.click(i), s.click(o), setTimeout(() => {
|
|
35
|
+
t(T).toBeVisible(), t(n).toBeVisible();
|
|
36
|
+
}, 300);
|
|
37
|
+
}), m("applies correct transition classes when expanding and collapsing", () => {
|
|
38
|
+
var o;
|
|
39
|
+
r(/* @__PURE__ */ c(a, { items: l, multiple: !0 }));
|
|
40
|
+
const i = e.getByText("Title 1");
|
|
41
|
+
s.click(i);
|
|
42
|
+
const n = (o = e.getByText("Content 1").parentElement) == null ? void 0 : o.parentElement;
|
|
43
|
+
t(n).toHaveClass("open"), s.click(i), t(n).toHaveClass("closed");
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { C as g } from "../../chevron-down-DSUzBz9F.js";
|
|
4
|
+
import '../../assets/index25.css';const C = "_accordion_1ozgm_1", u = "_accordionItem_1ozgm_8", z = "_accordionHeader_1ozgm_16", h = "_accordionContentWrapper_1ozgm_35", f = "_open_1ozgm_42", N = "_closed_1ozgm_48", $ = "_accordionContent_1ozgm_35", x = "_icon_1ozgm_60", H = "_rotate_1ozgm_64", c = {
|
|
5
|
+
accordion: C,
|
|
6
|
+
accordionItem: u,
|
|
7
|
+
accordionHeader: z,
|
|
8
|
+
accordionContentWrapper: h,
|
|
9
|
+
open: f,
|
|
10
|
+
closed: N,
|
|
11
|
+
accordionContent: $,
|
|
12
|
+
icon: x,
|
|
13
|
+
rotate: H
|
|
14
|
+
};
|
|
15
|
+
function j({
|
|
16
|
+
items: s,
|
|
17
|
+
multiple: i = !1,
|
|
18
|
+
className: d
|
|
19
|
+
}) {
|
|
20
|
+
const [m, _] = p([]), l = (o) => {
|
|
21
|
+
_((n) => i ? n.includes(o) ? n.filter((r) => r !== o) : [...n, o] : n.includes(o) ? [] : [o]);
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ e("div", { className: `${c.accordion} ${d ?? ""}`, children: s.map(({ id: o, title: n, content: r }) => {
|
|
24
|
+
const t = m.includes(o);
|
|
25
|
+
return /* @__PURE__ */ a("div", { className: c.accordionItem, children: [
|
|
26
|
+
/* @__PURE__ */ a(
|
|
27
|
+
"button",
|
|
28
|
+
{
|
|
29
|
+
className: c.accordionHeader,
|
|
30
|
+
onClick: () => l(o),
|
|
31
|
+
"aria-expanded": t,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ e("span", { children: n }),
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
g,
|
|
36
|
+
{
|
|
37
|
+
className: `${c.icon} ${t ? c.rotate : ""}`
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ e("div", { className: t ? c.open : c.closed, children: /* @__PURE__ */ e("div", { className: c.accordionContentWrapper, children: /* @__PURE__ */ e("div", { className: `${c.accordionContent}`, children: r }) }) })
|
|
44
|
+
] }, o);
|
|
45
|
+
}) });
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
j as Accordion
|
|
49
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { d as v, i as r, r as l, s as a, g as t, v as m, f as u, w as n } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Alert as i } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
v("Alert", () => {
|
|
6
|
+
r("renders the alert with the correct message and variant", () => {
|
|
7
|
+
l(/* @__PURE__ */ o(i, { message: "Info Alert", variant: "info" }));
|
|
8
|
+
const e = a.getByText("Info Alert").parentElement;
|
|
9
|
+
t(e).toBeInTheDocument(), t(e).toHaveClass("info");
|
|
10
|
+
}), r("applies the success variant class", () => {
|
|
11
|
+
l(/* @__PURE__ */ o(i, { message: "Info Alert", variant: "success" }));
|
|
12
|
+
const e = a.getByText("Info Alert").parentElement;
|
|
13
|
+
t(e).toBeInTheDocument(), t(e).toHaveClass("success");
|
|
14
|
+
}), r("triggers onClose callback when close button is clicked", async () => {
|
|
15
|
+
const e = m.fn();
|
|
16
|
+
l(/* @__PURE__ */ o(i, { message: "Info Alert", onClose: e, variant: "success" }));
|
|
17
|
+
const s = a.getByRole("button", { name: /close/i });
|
|
18
|
+
u.click(s), await n(() => {
|
|
19
|
+
t(e).toHaveBeenCalledTimes(1);
|
|
20
|
+
});
|
|
21
|
+
}), r("transitions in and out smoothly", async () => {
|
|
22
|
+
const e = m.fn();
|
|
23
|
+
l(
|
|
24
|
+
/* @__PURE__ */ o(i, { message: "Transition Alert", onClose: e, variant: "success" })
|
|
25
|
+
);
|
|
26
|
+
const s = a.getByText("Transition Alert").parentElement;
|
|
27
|
+
t(s).toBeInTheDocument(), await n(() => {
|
|
28
|
+
t(s).toHaveClass("enter");
|
|
29
|
+
});
|
|
30
|
+
const c = a.getByRole("button", { name: /close/i });
|
|
31
|
+
u.click(c), await n(() => {
|
|
32
|
+
t(s).toHaveClass("exit");
|
|
33
|
+
}), await n(() => {
|
|
34
|
+
t(e).toHaveBeenCalledTimes(1);
|
|
35
|
+
});
|
|
36
|
+
}), r("removes the alert from the DOM after the exit transition", async () => {
|
|
37
|
+
const e = m.fn();
|
|
38
|
+
l(
|
|
39
|
+
/* @__PURE__ */ o(i, { message: "Transition Alert", onClose: e, variant: "success" })
|
|
40
|
+
);
|
|
41
|
+
const s = a.getByText("Transition Alert").parentElement;
|
|
42
|
+
t(s).toBeInTheDocument(), await n(() => {
|
|
43
|
+
t(s).toHaveClass("enter");
|
|
44
|
+
});
|
|
45
|
+
const c = a.getByRole("button", { name: /close/i });
|
|
46
|
+
u.click(c), await n(() => {
|
|
47
|
+
t(s).toHaveClass("exit");
|
|
48
|
+
}), await n(() => {
|
|
49
|
+
t(s).not.toBeInTheDocument();
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as c, useEffect as d } from "react";
|
|
3
|
+
import { X as y } from "../../x-CnsEH4Ox.js";
|
|
4
|
+
import '../../assets/index26.css';const x = "_alert_ucye1_1", p = "_enter_ucye1_15", g = "_exit_ucye1_20", w = "_info_ucye1_25", b = "_success_ucye1_30", h = "_warning_ucye1_35", B = "_error_ucye1_40", $ = "_closeButton_ucye1_45", e = {
|
|
5
|
+
alert: x,
|
|
6
|
+
enter: p,
|
|
7
|
+
exit: g,
|
|
8
|
+
info: w,
|
|
9
|
+
success: b,
|
|
10
|
+
warning: h,
|
|
11
|
+
error: B,
|
|
12
|
+
closeButton: $
|
|
13
|
+
}, j = {
|
|
14
|
+
info: e.info,
|
|
15
|
+
success: e.success,
|
|
16
|
+
warning: e.warning,
|
|
17
|
+
error: e.error
|
|
18
|
+
};
|
|
19
|
+
function R({
|
|
20
|
+
message: i,
|
|
21
|
+
variant: o = "info",
|
|
22
|
+
onClose: t,
|
|
23
|
+
className: u
|
|
24
|
+
}) {
|
|
25
|
+
const [s, a] = c(!0), [l, _] = c(!0);
|
|
26
|
+
d(() => {
|
|
27
|
+
let n;
|
|
28
|
+
return s || (n = setTimeout(() => {
|
|
29
|
+
_(!1), t == null || t();
|
|
30
|
+
}, 300)), () => clearTimeout(n);
|
|
31
|
+
}, [s, t]);
|
|
32
|
+
const f = () => {
|
|
33
|
+
a(!1);
|
|
34
|
+
};
|
|
35
|
+
return l ? /* @__PURE__ */ m(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: `${e.alert} ${j[o]} ${s ? e.enter : e.exit} ${u ?? ""}`,
|
|
39
|
+
role: "alert",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ r("span", { children: i }),
|
|
42
|
+
/* @__PURE__ */ r(
|
|
43
|
+
"button",
|
|
44
|
+
{
|
|
45
|
+
className: e.closeButton,
|
|
46
|
+
onClick: f,
|
|
47
|
+
"aria-label": "Close",
|
|
48
|
+
children: /* @__PURE__ */ r(y, { size: 20 })
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
) : null;
|
|
54
|
+
}
|
|
55
|
+
export {
|
|
56
|
+
R as Alert
|
|
57
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { d as l, i as s, r as o, s as i, g as e, v as c, f as d } from "../../vi.B-PuvDzu-a048kFcX.js";
|
|
3
|
+
import { Avatar as r } from "./index.js";
|
|
4
|
+
import "../../index-Bgo8MuTU.js";
|
|
5
|
+
l("Avatar", () => {
|
|
6
|
+
s("renders an image when src is provided", () => {
|
|
7
|
+
o(/* @__PURE__ */ a(r, { src: "https://via.placeholder.com/150", alt: "User avatar" }));
|
|
8
|
+
const t = i.getByRole("img", { name: "User avatar" });
|
|
9
|
+
e(t).toBeInTheDocument(), e(t).toHaveAttribute("src", "https://via.placeholder.com/150");
|
|
10
|
+
}), s("renders with initials when no image is provided", () => {
|
|
11
|
+
o(/* @__PURE__ */ a(r, { initials: "JC" }));
|
|
12
|
+
const t = i.getByText("JC");
|
|
13
|
+
e(t).toBeInTheDocument();
|
|
14
|
+
}), s("applies the correct size class", () => {
|
|
15
|
+
o(/* @__PURE__ */ a(r, { size: "lg", initials: "JC" }));
|
|
16
|
+
const t = i.getByText("JC").parentElement;
|
|
17
|
+
e(t).toHaveClass("lg");
|
|
18
|
+
}), s("applies the correct status class", () => {
|
|
19
|
+
o(/* @__PURE__ */ a(r, { status: "offline", size: "lg", initials: "JC" }));
|
|
20
|
+
const t = i.getByRole("status");
|
|
21
|
+
e(t).toBeInTheDocument(), e(t).toHaveClass("offline");
|
|
22
|
+
}), s("applies borderColor and backgroundColor styles", () => {
|
|
23
|
+
o(
|
|
24
|
+
/* @__PURE__ */ a(
|
|
25
|
+
r,
|
|
26
|
+
{
|
|
27
|
+
borderColor: "yellow",
|
|
28
|
+
backgroundColor: "rgb(255, 0, 255)",
|
|
29
|
+
status: "offline",
|
|
30
|
+
size: "lg",
|
|
31
|
+
initials: "JC"
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
const t = i.getByText("JC").parentElement;
|
|
36
|
+
e(t).toHaveStyle("border-color: yellow"), e(t).toHaveStyle("background-color: rgb(255, 0, 255)");
|
|
37
|
+
}), s("renders as a button if onClick is provided", () => {
|
|
38
|
+
const t = c.fn();
|
|
39
|
+
o(/* @__PURE__ */ a(r, { initials: "JC", onClick: t }));
|
|
40
|
+
const n = i.getByRole("button", { name: "User avatar" });
|
|
41
|
+
d.click(n), e(t).toHaveBeenCalledTimes(1);
|
|
42
|
+
}), s("renders a status indicator if status is not provided", () => {
|
|
43
|
+
o(/* @__PURE__ */ a(r, { initials: "JC" }));
|
|
44
|
+
const t = i.queryByRole("status");
|
|
45
|
+
e(t).not.toBeInTheDocument();
|
|
46
|
+
}), s("renders a status indicator when the status is provided", () => {
|
|
47
|
+
o(/* @__PURE__ */ a(r, { initials: "JC", status: "online" }));
|
|
48
|
+
const t = i.queryByRole("status");
|
|
49
|
+
e(t).toBeInTheDocument(), e(t).toHaveClass("online");
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import '../../assets/index22.css';const d = "_avatar_xustn_1", x = "_sm_xustn_17", f = "_md_xustn_23", v = "_lg_xustn_29", g = "_image_xustn_35", b = "_initials_xustn_42", y = "_status_xustn_47", p = "_online_xustn_59", $ = "_offline_xustn_63", N = "_busy_xustn_67", s = {
|
|
3
|
+
avatar: d,
|
|
4
|
+
sm: x,
|
|
5
|
+
md: f,
|
|
6
|
+
lg: v,
|
|
7
|
+
image: g,
|
|
8
|
+
initials: b,
|
|
9
|
+
status: y,
|
|
10
|
+
online: p,
|
|
11
|
+
offline: $,
|
|
12
|
+
busy: N
|
|
13
|
+
}, h = {
|
|
14
|
+
sm: s.sm,
|
|
15
|
+
md: s.md,
|
|
16
|
+
lg: s.lg
|
|
17
|
+
}, j = {
|
|
18
|
+
online: s.online,
|
|
19
|
+
offline: s.offline,
|
|
20
|
+
busy: s.busy
|
|
21
|
+
};
|
|
22
|
+
function M({
|
|
23
|
+
src: t,
|
|
24
|
+
alt: a = "User avatar",
|
|
25
|
+
size: e = "md",
|
|
26
|
+
initials: _,
|
|
27
|
+
status: o,
|
|
28
|
+
borderColor: c = "var(--color-border)",
|
|
29
|
+
backgroundColor: r = "var(--color-secondary)",
|
|
30
|
+
onClick: i,
|
|
31
|
+
className: u
|
|
32
|
+
}) {
|
|
33
|
+
const l = !!i;
|
|
34
|
+
return /* @__PURE__ */ m(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
className: `${s.avatar} ${h[e]} ${u ?? ""}`,
|
|
38
|
+
style: { borderColor: c, backgroundColor: r },
|
|
39
|
+
onClick: i,
|
|
40
|
+
role: l ? "button" : void 0,
|
|
41
|
+
"aria-label": l ? a : void 0,
|
|
42
|
+
children: [
|
|
43
|
+
t ? /* @__PURE__ */ n("img", { src: t, alt: a, className: s.image }) : /* @__PURE__ */ n("span", { className: s.initials, children: _ }),
|
|
44
|
+
o && /* @__PURE__ */ n("span", { className: `${s.status} ${j[o]}`, role: "status" })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
M as Avatar
|
|
51
|
+
};
|