@fragments-sdk/ui 0.17.1 → 0.19.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.
- package/dist/assets/ui.css +2700 -3256
- package/dist/chart.cjs +0 -1
- package/dist/chart.js +0 -1
- package/dist/codeblock.cjs +0 -1
- package/dist/codeblock.js +0 -1
- package/dist/colorpicker.cjs +0 -1
- package/dist/colorpicker.js +0 -1
- package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
- package/dist/components/Accordion/Accordion.module.scss.js +8 -8
- package/dist/components/Alert/Alert.module.scss.cjs +12 -12
- package/dist/components/Alert/Alert.module.scss.js +12 -12
- package/dist/components/AppShell/AppShell.module.scss.cjs +12 -12
- package/dist/components/AppShell/AppShell.module.scss.js +12 -12
- package/dist/components/Avatar/Avatar.module.scss.cjs +13 -13
- package/dist/components/Avatar/Avatar.module.scss.js +13 -13
- package/dist/components/Badge/Badge.module.scss.cjs +13 -13
- package/dist/components/Badge/Badge.module.scss.js +13 -13
- package/dist/components/BentoGrid/BentoGrid.module.scss.cjs +14 -14
- package/dist/components/BentoGrid/BentoGrid.module.scss.js +14 -14
- package/dist/components/Box/Box.module.scss.cjs +152 -152
- package/dist/components/Box/Box.module.scss.js +152 -152
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.cjs +8 -8
- package/dist/components/Breadcrumbs/Breadcrumbs.module.scss.js +8 -8
- package/dist/components/Button/Button.module.scss.cjs +12 -12
- package/dist/components/Button/Button.module.scss.js +12 -12
- package/dist/components/Card/Card.module.scss.cjs +14 -14
- package/dist/components/Card/Card.module.scss.js +14 -14
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- package/dist/components/Chart/index.d.ts +0 -1
- package/dist/components/Chart/index.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +10 -10
- package/dist/components/Checkbox/Checkbox.module.scss.js +10 -10
- package/dist/components/Chip/Chip.module.scss.cjs +15 -15
- package/dist/components/Chip/Chip.module.scss.js +15 -15
- package/dist/components/CodeBlock/CodeBlock.module.scss.cjs +21 -21
- package/dist/components/CodeBlock/CodeBlock.module.scss.js +21 -21
- package/dist/components/CodeBlock/index.d.ts +0 -1
- package/dist/components/CodeBlock/index.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.module.scss.cjs +10 -10
- package/dist/components/Collapsible/Collapsible.module.scss.js +10 -10
- package/dist/components/ColorPicker/ColorPicker.module.scss.cjs +14 -14
- package/dist/components/ColorPicker/ColorPicker.module.scss.js +14 -14
- package/dist/components/ColorPicker/index.d.ts +0 -1
- package/dist/components/ColorPicker/index.d.ts.map +1 -1
- package/dist/components/Combobox/Combobox.module.scss.cjs +23 -23
- package/dist/components/Combobox/Combobox.module.scss.js +23 -23
- package/dist/components/Combobox/index.cjs +13 -10
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +13 -10
- package/dist/components/Command/Command.module.scss.cjs +11 -11
- package/dist/components/Command/Command.module.scss.js +11 -11
- package/dist/components/ConversationList/ConversationList.module.scss.cjs +10 -10
- package/dist/components/ConversationList/ConversationList.module.scss.js +10 -10
- package/dist/components/DataTable/DataTable.module.scss.cjs +26 -26
- package/dist/components/DataTable/DataTable.module.scss.js +26 -26
- package/dist/components/DataTable/index.cjs +0 -1
- package/dist/components/DataTable/index.d.ts +0 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DataTable/index.js +0 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs +31 -31
- package/dist/components/DatePicker/DatePicker.module.scss.js +31 -31
- package/dist/components/DatePicker/index.d.ts +0 -1
- package/dist/components/DatePicker/index.d.ts.map +1 -1
- package/dist/components/Dialog/Dialog.module.scss.cjs +14 -14
- package/dist/components/Dialog/Dialog.module.scss.js +14 -14
- package/dist/components/Drawer/Drawer.module.scss.cjs +33 -27
- package/dist/components/Drawer/Drawer.module.scss.js +34 -28
- package/dist/components/Drawer/index.cjs +36 -14
- package/dist/components/Drawer/index.d.ts +21 -3
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +36 -14
- package/dist/components/Editor/Editor.module.scss.cjs +17 -17
- package/dist/components/Editor/Editor.module.scss.js +17 -17
- package/dist/components/EmptyState/EmptyState.module.scss.cjs +8 -8
- package/dist/components/EmptyState/EmptyState.module.scss.js +8 -8
- package/dist/components/Field/Field.module.scss.cjs +4 -4
- package/dist/components/Field/Field.module.scss.js +4 -4
- package/dist/components/Fieldset/Fieldset.module.scss.cjs +3 -3
- package/dist/components/Fieldset/Fieldset.module.scss.js +3 -3
- package/dist/components/Header/Header.module.scss.cjs +28 -28
- package/dist/components/Header/Header.module.scss.js +28 -28
- package/dist/components/Icon/Icon.module.scss.cjs +8 -8
- package/dist/components/Icon/Icon.module.scss.js +8 -8
- package/dist/components/Image/Image.module.scss.cjs +27 -27
- package/dist/components/Image/Image.module.scss.js +27 -27
- package/dist/components/Input/Input.module.scss.cjs +19 -19
- package/dist/components/Input/Input.module.scss.js +19 -19
- package/dist/components/Link/Link.module.scss.cjs +10 -10
- package/dist/components/Link/Link.module.scss.js +10 -10
- package/dist/components/Listbox/Listbox.module.scss.cjs +8 -8
- package/dist/components/Listbox/Listbox.module.scss.js +8 -8
- package/dist/components/Loading/Loading.module.scss.cjs +30 -30
- package/dist/components/Loading/Loading.module.scss.js +30 -30
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Markdown/index.d.ts +0 -1
- package/dist/components/Markdown/index.d.ts.map +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +16 -13
- package/dist/components/Menu/Menu.module.scss.js +17 -14
- package/dist/components/Menu/index.cjs +1 -1
- package/dist/components/Menu/index.d.ts.map +1 -1
- package/dist/components/Menu/index.js +1 -1
- package/dist/components/Message/Message.module.scss.cjs +18 -18
- package/dist/components/Message/Message.module.scss.js +18 -18
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.cjs +28 -28
- package/dist/components/NavigationMenu/NavigationMenu.module.scss.js +28 -28
- package/dist/components/Pagination/Pagination.module.scss.cjs +7 -7
- package/dist/components/Pagination/Pagination.module.scss.js +7 -7
- package/dist/components/Popover/Popover.module.scss.cjs +10 -10
- package/dist/components/Popover/Popover.module.scss.js +10 -10
- package/dist/components/Progress/Progress.module.scss.cjs +25 -25
- package/dist/components/Progress/Progress.module.scss.js +25 -25
- package/dist/components/Prompt/Prompt.module.scss.cjs +26 -14
- package/dist/components/Prompt/Prompt.module.scss.js +26 -14
- package/dist/components/Prompt/index.cjs +16 -0
- package/dist/components/Prompt/index.d.ts +17 -1
- package/dist/components/Prompt/index.d.ts.map +1 -1
- package/dist/components/Prompt/index.js +16 -0
- package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +16 -16
- package/dist/components/RadioGroup/RadioGroup.module.scss.js +16 -16
- package/dist/components/ScrollArea/ScrollArea.module.scss.cjs +10 -10
- package/dist/components/ScrollArea/ScrollArea.module.scss.js +10 -10
- package/dist/components/Select/Select.module.scss.cjs +17 -17
- package/dist/components/Select/Select.module.scss.js +17 -17
- package/dist/components/Select/index.cjs +20 -20
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/components/Select/index.js +20 -20
- package/dist/components/Separator/Separator.module.scss.cjs +10 -10
- package/dist/components/Separator/Separator.module.scss.js +10 -10
- package/dist/components/Sidebar/Sidebar.module.scss.cjs +42 -42
- package/dist/components/Sidebar/Sidebar.module.scss.js +42 -42
- package/dist/components/Slider/Slider.module.scss.cjs +12 -12
- package/dist/components/Slider/Slider.module.scss.js +12 -12
- package/dist/components/Slider/index.cjs +23 -21
- package/dist/components/Slider/index.js +23 -21
- package/dist/components/Stack/Stack.module.scss.cjs +35 -35
- package/dist/components/Stack/Stack.module.scss.js +35 -35
- package/dist/components/Table/Table.module.scss.cjs +16 -16
- package/dist/components/Table/Table.module.scss.js +16 -16
- package/dist/components/Table/index.d.ts +0 -1
- package/dist/components/Table/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +7 -7
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +7 -7
- package/dist/components/Tabs/Tabs.module.scss.cjs +9 -9
- package/dist/components/Tabs/Tabs.module.scss.js +9 -9
- package/dist/components/Text/Text.module.scss.cjs +38 -38
- package/dist/components/Text/Text.module.scss.js +38 -38
- package/dist/components/Textarea/Textarea.module.scss.cjs +23 -23
- package/dist/components/Textarea/Textarea.module.scss.js +23 -23
- package/dist/components/Theme/ThemeToggle.module.scss.cjs +6 -6
- package/dist/components/Theme/ThemeToggle.module.scss.js +6 -6
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.cjs +22 -22
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +22 -22
- package/dist/components/Toast/Toast.module.scss.cjs +20 -20
- package/dist/components/Toast/Toast.module.scss.js +20 -20
- package/dist/components/Toggle/Toggle.module.scss.cjs +13 -13
- package/dist/components/Toggle/Toggle.module.scss.js +13 -13
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.cjs +17 -17
- package/dist/components/ToggleGroup/ToggleGroup.module.scss.js +17 -17
- package/dist/components/Tooltip/Tooltip.module.scss.cjs +3 -3
- package/dist/components/Tooltip/Tooltip.module.scss.js +3 -3
- package/dist/components/Tooltip/index.cjs +4 -3
- package/dist/components/Tooltip/index.d.ts +4 -1
- package/dist/components/Tooltip/index.d.ts.map +1 -1
- package/dist/components/Tooltip/index.js +4 -3
- package/dist/datepicker.cjs +0 -1
- package/dist/datepicker.js +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/markdown.cjs +0 -1
- package/dist/markdown.js +0 -1
- package/dist/table.cjs +0 -1
- package/dist/table.js +0 -1
- package/dist/utils/seed-derivation.cjs +29 -0
- package/dist/utils/seed-derivation.d.ts +1 -1
- package/dist/utils/seed-derivation.d.ts.map +1 -1
- package/dist/utils/seed-derivation.js +29 -0
- package/fragments.json +1 -1
- package/package.json +18 -14
- package/src/components/Accordion/Accordion.contract.json +169 -0
- package/src/components/Alert/Alert.contract.json +157 -0
- package/src/components/AppShell/AppShell.contract.json +155 -0
- package/src/components/Avatar/Avatar.contract.json +189 -0
- package/src/components/Badge/Badge.contract.json +187 -0
- package/src/components/BentoGrid/BentoGrid.contract.json +135 -0
- package/src/components/Box/Box.contract.json +423 -0
- package/src/components/Breadcrumbs/Breadcrumbs.contract.json +143 -0
- package/src/components/Button/Button.contract.json +205 -0
- package/src/components/Button/Button.module.scss +24 -1
- package/src/components/ButtonGroup/ButtonGroup.contract.json +140 -0
- package/src/components/Card/Card.contract.json +185 -0
- package/src/components/Card/Card.module.scss +5 -1
- package/src/components/Chart/Chart.contract.json +129 -0
- package/src/components/Chart/index.tsx +0 -1
- package/src/components/Checkbox/Checkbox.contract.json +246 -0
- package/src/components/Chip/Chip.contract.json +212 -0
- package/src/components/Chip/Chip.module.scss +4 -4
- package/src/components/CodeBlock/CodeBlock.contract.json +388 -0
- package/src/components/CodeBlock/index.tsx +0 -1
- package/src/components/Collapsible/Collapsible.contract.json +154 -0
- package/src/components/ColorPicker/ColorPicker.contract.json +212 -0
- package/src/components/ColorPicker/index.tsx +0 -1
- package/src/components/Combobox/Combobox.contract.json +297 -0
- package/src/components/Combobox/index.tsx +7 -8
- package/src/components/Command/Command.contract.json +165 -0
- package/src/components/Command/Command.module.scss +22 -9
- package/src/components/ConversationList/ConversationList.contract.json +151 -0
- package/src/components/DataTable/DataTable.contract.json +302 -0
- package/src/components/DataTable/index.tsx +0 -2
- package/src/components/DatePicker/DatePicker.contract.json +288 -0
- package/src/components/DatePicker/index.tsx +0 -2
- package/src/components/Dialog/Dialog.contract.json +159 -0
- package/src/components/Drawer/Drawer.contract.json +161 -0
- package/src/components/Drawer/Drawer.module.scss +45 -5
- package/src/components/Drawer/index.tsx +66 -23
- package/src/components/Editor/Editor.contract.json +263 -0
- package/src/components/EmptyState/EmptyState.contract.json +133 -0
- package/src/components/Field/Field.contract.json +157 -0
- package/src/components/Fieldset/Fieldset.contract.json +117 -0
- package/src/components/Form/Form.contract.json +145 -0
- package/src/components/Grid/Grid.contract.json +195 -0
- package/src/components/Header/Header.contract.json +196 -0
- package/src/components/Icon/Icon.contract.json +194 -0
- package/src/components/Image/Image.contract.json +209 -0
- package/src/components/Input/Input.contract.json +344 -0
- package/src/components/Input/Input.module.scss +16 -6
- package/src/components/Link/Link.contract.json +180 -0
- package/src/components/List/List.contract.json +154 -0
- package/src/components/Listbox/Listbox.contract.json +158 -0
- package/src/components/Loading/Loading.contract.json +167 -0
- package/src/components/Markdown/Markdown.contract.json +127 -0
- package/src/components/Markdown/Markdown.module.scss +0 -3
- package/src/components/Markdown/index.tsx +0 -1
- package/src/components/Menu/Menu.contract.json +177 -0
- package/src/components/Menu/Menu.module.scss +6 -0
- package/src/components/Menu/index.tsx +3 -1
- package/src/components/Message/Message.contract.json +183 -0
- package/src/components/Message/Message.module.scss +2 -2
- package/src/components/NavigationMenu/NavigationMenu.contract.json +203 -0
- package/src/components/NavigationMenu/NavigationMenu.module.scss +18 -23
- package/src/components/Pagination/Pagination.contract.json +163 -0
- package/src/components/Pagination/Pagination.module.scss +1 -1
- package/src/components/Popover/Popover.contract.json +163 -0
- package/src/components/Progress/Progress.contract.json +176 -0
- package/src/components/Prompt/Prompt.contract.json +211 -0
- package/src/components/Prompt/Prompt.module.scss +117 -3
- package/src/components/Prompt/index.tsx +40 -0
- package/src/components/RadioGroup/RadioGroup.contract.json +226 -0
- package/src/components/ScrollArea/ScrollArea.contract.json +131 -0
- package/src/components/Select/Select.contract.json +269 -0
- package/src/components/Select/index.tsx +20 -25
- package/src/components/Separator/Separator.contract.json +143 -0
- package/src/components/Sidebar/Sidebar.contract.json +258 -0
- package/src/components/Sidebar/Sidebar.module.scss +1 -1
- package/src/components/Skeleton/Skeleton.contract.json +166 -0
- package/src/components/Slider/Slider.contract.json +248 -0
- package/src/components/Slider/index.tsx +10 -10
- package/src/components/Stack/Stack.contract.json +220 -0
- package/src/components/Table/Table.contract.json +171 -0
- package/src/components/Table/index.tsx +0 -2
- package/src/components/TableOfContents/TableOfContents.contract.json +145 -0
- package/src/components/TableOfContents/TableOfContents.module.scss +19 -15
- package/src/components/Tabs/Tabs.contract.json +159 -0
- package/src/components/Text/Text.contract.json +239 -0
- package/src/components/Textarea/Textarea.contract.json +308 -0
- package/src/components/Theme/Theme.contract.json +152 -0
- package/src/components/ThinkingIndicator/ThinkingIndicator.contract.json +165 -0
- package/src/components/Toast/Toast.contract.json +181 -0
- package/src/components/Toggle/Toggle.contract.json +231 -0
- package/src/components/Toggle/Toggle.module.scss +3 -3
- package/src/components/ToggleGroup/ToggleGroup.contract.json +206 -0
- package/src/components/Tooltip/Tooltip.contract.json +214 -0
- package/src/components/Tooltip/index.tsx +7 -3
- package/src/components/VisuallyHidden/VisuallyHidden.contract.json +116 -0
- package/src/index.ts +8 -3
- package/src/styles/globals.scss +6 -1
- package/src/tokens/_computed.scss +3 -1
- package/src/tokens/_density.scss +4 -4
- package/src/tokens/_derive.scss +52 -56
- package/src/tokens/_palettes.scss +20 -1
- package/src/tokens/_seeds.scss +2 -2
- package/src/tokens/_variables.scss +45 -29
- package/src/utils/seed-derivation.ts +23 -1
|
@@ -1,49 +1,53 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const backdrop = "
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
3
|
+
const backdrop = "_backdrop_13zr4_1";
|
|
4
|
+
const viewport = "_viewport_13zr4_16";
|
|
5
|
+
const popup = "_popup_13zr4_26";
|
|
6
|
+
const sideRight = "_side-right_13zr4_51";
|
|
7
|
+
const sideLeft = "_side-left_13zr4_64";
|
|
8
|
+
const sideTop = "_side-top_13zr4_77";
|
|
9
|
+
const sideBottom = "_side-bottom_13zr4_90";
|
|
10
|
+
const sizeSm = "_size-sm_13zr4_107";
|
|
11
|
+
const sizeMd = "_size-md_13zr4_111";
|
|
12
|
+
const sizeLg = "_size-lg_13zr4_115";
|
|
13
|
+
const sizeXl = "_size-xl_13zr4_119";
|
|
14
|
+
const sizeFull = "_size-full_13zr4_123";
|
|
15
|
+
const header = "_header_13zr4_149";
|
|
16
|
+
const title = "_title_13zr4_153";
|
|
17
|
+
const description = "_description_13zr4_161";
|
|
18
|
+
const body = "_body_13zr4_168";
|
|
19
|
+
const footer = "_footer_13zr4_174";
|
|
20
|
+
const close = "_close_13zr4_184";
|
|
21
|
+
const swipeArea = "_swipeArea_13zr4_230";
|
|
20
22
|
const styles = {
|
|
21
23
|
backdrop,
|
|
24
|
+
viewport,
|
|
22
25
|
popup,
|
|
23
|
-
"side-right": "_side-
|
|
26
|
+
"side-right": "_side-right_13zr4_51",
|
|
24
27
|
sideRight,
|
|
25
|
-
"side-left": "_side-
|
|
28
|
+
"side-left": "_side-left_13zr4_64",
|
|
26
29
|
sideLeft,
|
|
27
|
-
"side-top": "_side-
|
|
30
|
+
"side-top": "_side-top_13zr4_77",
|
|
28
31
|
sideTop,
|
|
29
|
-
"side-bottom": "_side-
|
|
32
|
+
"side-bottom": "_side-bottom_13zr4_90",
|
|
30
33
|
sideBottom,
|
|
31
|
-
"size-sm": "_size-
|
|
34
|
+
"size-sm": "_size-sm_13zr4_107",
|
|
32
35
|
sizeSm,
|
|
33
|
-
"size-md": "_size-
|
|
36
|
+
"size-md": "_size-md_13zr4_111",
|
|
34
37
|
sizeMd,
|
|
35
|
-
"size-lg": "_size-
|
|
38
|
+
"size-lg": "_size-lg_13zr4_115",
|
|
36
39
|
sizeLg,
|
|
37
|
-
"size-xl": "_size-
|
|
40
|
+
"size-xl": "_size-xl_13zr4_119",
|
|
38
41
|
sizeXl,
|
|
39
|
-
"size-full": "_size-
|
|
42
|
+
"size-full": "_size-full_13zr4_123",
|
|
40
43
|
sizeFull,
|
|
41
44
|
header,
|
|
42
45
|
title,
|
|
43
46
|
description,
|
|
44
47
|
body,
|
|
45
48
|
footer,
|
|
46
|
-
close
|
|
49
|
+
close,
|
|
50
|
+
swipeArea
|
|
47
51
|
};
|
|
48
52
|
exports.backdrop = backdrop;
|
|
49
53
|
exports.body = body;
|
|
@@ -62,4 +66,6 @@ exports.sizeLg = sizeLg;
|
|
|
62
66
|
exports.sizeMd = sizeMd;
|
|
63
67
|
exports.sizeSm = sizeSm;
|
|
64
68
|
exports.sizeXl = sizeXl;
|
|
69
|
+
exports.swipeArea = swipeArea;
|
|
65
70
|
exports.title = title;
|
|
71
|
+
exports.viewport = viewport;
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
const backdrop = "
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
1
|
+
const backdrop = "_backdrop_13zr4_1";
|
|
2
|
+
const viewport = "_viewport_13zr4_16";
|
|
3
|
+
const popup = "_popup_13zr4_26";
|
|
4
|
+
const sideRight = "_side-right_13zr4_51";
|
|
5
|
+
const sideLeft = "_side-left_13zr4_64";
|
|
6
|
+
const sideTop = "_side-top_13zr4_77";
|
|
7
|
+
const sideBottom = "_side-bottom_13zr4_90";
|
|
8
|
+
const sizeSm = "_size-sm_13zr4_107";
|
|
9
|
+
const sizeMd = "_size-md_13zr4_111";
|
|
10
|
+
const sizeLg = "_size-lg_13zr4_115";
|
|
11
|
+
const sizeXl = "_size-xl_13zr4_119";
|
|
12
|
+
const sizeFull = "_size-full_13zr4_123";
|
|
13
|
+
const header = "_header_13zr4_149";
|
|
14
|
+
const title = "_title_13zr4_153";
|
|
15
|
+
const description = "_description_13zr4_161";
|
|
16
|
+
const body = "_body_13zr4_168";
|
|
17
|
+
const footer = "_footer_13zr4_174";
|
|
18
|
+
const close = "_close_13zr4_184";
|
|
19
|
+
const swipeArea = "_swipeArea_13zr4_230";
|
|
18
20
|
const styles = {
|
|
19
21
|
backdrop,
|
|
22
|
+
viewport,
|
|
20
23
|
popup,
|
|
21
|
-
"side-right": "_side-
|
|
24
|
+
"side-right": "_side-right_13zr4_51",
|
|
22
25
|
sideRight,
|
|
23
|
-
"side-left": "_side-
|
|
26
|
+
"side-left": "_side-left_13zr4_64",
|
|
24
27
|
sideLeft,
|
|
25
|
-
"side-top": "_side-
|
|
28
|
+
"side-top": "_side-top_13zr4_77",
|
|
26
29
|
sideTop,
|
|
27
|
-
"side-bottom": "_side-
|
|
30
|
+
"side-bottom": "_side-bottom_13zr4_90",
|
|
28
31
|
sideBottom,
|
|
29
|
-
"size-sm": "_size-
|
|
32
|
+
"size-sm": "_size-sm_13zr4_107",
|
|
30
33
|
sizeSm,
|
|
31
|
-
"size-md": "_size-
|
|
34
|
+
"size-md": "_size-md_13zr4_111",
|
|
32
35
|
sizeMd,
|
|
33
|
-
"size-lg": "_size-
|
|
36
|
+
"size-lg": "_size-lg_13zr4_115",
|
|
34
37
|
sizeLg,
|
|
35
|
-
"size-xl": "_size-
|
|
38
|
+
"size-xl": "_size-xl_13zr4_119",
|
|
36
39
|
sizeXl,
|
|
37
|
-
"size-full": "_size-
|
|
40
|
+
"size-full": "_size-full_13zr4_123",
|
|
38
41
|
sizeFull,
|
|
39
42
|
header,
|
|
40
43
|
title,
|
|
41
44
|
description,
|
|
42
45
|
body,
|
|
43
46
|
footer,
|
|
44
|
-
close
|
|
47
|
+
close,
|
|
48
|
+
swipeArea
|
|
45
49
|
};
|
|
46
50
|
export {
|
|
47
51
|
backdrop,
|
|
@@ -61,5 +65,7 @@ export {
|
|
|
61
65
|
sizeMd,
|
|
62
66
|
sizeSm,
|
|
63
67
|
sizeXl,
|
|
64
|
-
|
|
68
|
+
swipeArea,
|
|
69
|
+
title,
|
|
70
|
+
viewport
|
|
65
71
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
5
|
+
const drawer = require("@base-ui/react/drawer");
|
|
6
6
|
const Drawer_module = require("./Drawer.module.scss.cjs");
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -53,15 +53,23 @@ function DrawerRoot({
|
|
|
53
53
|
open,
|
|
54
54
|
defaultOpen,
|
|
55
55
|
onOpenChange,
|
|
56
|
-
|
|
56
|
+
onOpenChangeComplete,
|
|
57
|
+
modal = true,
|
|
58
|
+
swipeDirection,
|
|
59
|
+
snapPoints,
|
|
60
|
+
disablePointerDismissal
|
|
57
61
|
}) {
|
|
58
62
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
59
|
-
|
|
63
|
+
drawer.Drawer.Root,
|
|
60
64
|
{
|
|
61
65
|
open,
|
|
62
66
|
defaultOpen,
|
|
63
67
|
onOpenChange,
|
|
68
|
+
onOpenChangeComplete,
|
|
64
69
|
modal,
|
|
70
|
+
swipeDirection,
|
|
71
|
+
snapPoints,
|
|
72
|
+
disablePointerDismissal,
|
|
65
73
|
children
|
|
66
74
|
}
|
|
67
75
|
);
|
|
@@ -74,9 +82,9 @@ function DrawerTrigger({
|
|
|
74
82
|
}) {
|
|
75
83
|
if (asChild) {
|
|
76
84
|
const child = getAsChildElement(children, "Drawer.Trigger");
|
|
77
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
85
|
+
return /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Trigger, { ...htmlProps, className, render: child, children: null });
|
|
78
86
|
}
|
|
79
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
87
|
+
return /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Trigger, { ...htmlProps, className, children });
|
|
80
88
|
}
|
|
81
89
|
function DrawerContent({
|
|
82
90
|
children,
|
|
@@ -93,9 +101,9 @@ function DrawerContent({
|
|
|
93
101
|
Drawer_module.default[`size-${size}`],
|
|
94
102
|
className
|
|
95
103
|
].filter(Boolean).join(" ");
|
|
96
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
97
|
-
backdrop && /* @__PURE__ */ jsxRuntime.jsx(
|
|
98
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(drawer.Drawer.Portal, { children: [
|
|
105
|
+
backdrop && /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Backdrop, { className: Drawer_module.default.backdrop }),
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Viewport, { className: Drawer_module.default.viewport, children: /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Popup, { initialFocus, ...htmlProps, "data-side": side, className: popupClasses, children: /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Content, { children }) }) })
|
|
99
107
|
] });
|
|
100
108
|
}
|
|
101
109
|
function DrawerHeader({ children, className, ...htmlProps }) {
|
|
@@ -104,11 +112,11 @@ function DrawerHeader({ children, className, ...htmlProps }) {
|
|
|
104
112
|
}
|
|
105
113
|
function DrawerTitle({ children, className, ...htmlProps }) {
|
|
106
114
|
const classes = [Drawer_module.default.title, className].filter(Boolean).join(" ");
|
|
107
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
115
|
+
return /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Title, { ...htmlProps, className: classes, children });
|
|
108
116
|
}
|
|
109
117
|
function DrawerDescription({ children, className, ...htmlProps }) {
|
|
110
118
|
const classes = [Drawer_module.default.description, className].filter(Boolean).join(" ");
|
|
111
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
119
|
+
return /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Description, { ...htmlProps, className: classes, children });
|
|
112
120
|
}
|
|
113
121
|
function DrawerBody({ children, className, ...htmlProps }) {
|
|
114
122
|
const classes = [Drawer_module.default.body, className].filter(Boolean).join(" ");
|
|
@@ -121,7 +129,7 @@ function DrawerFooter({ children, className, ...htmlProps }) {
|
|
|
121
129
|
function DrawerClose({ children, asChild, className, ...htmlProps }) {
|
|
122
130
|
if (!children) {
|
|
123
131
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
124
|
-
|
|
132
|
+
drawer.Drawer.Close,
|
|
125
133
|
{
|
|
126
134
|
...htmlProps,
|
|
127
135
|
"data-drawer-close": true,
|
|
@@ -134,7 +142,7 @@ function DrawerClose({ children, asChild, className, ...htmlProps }) {
|
|
|
134
142
|
if (asChild) {
|
|
135
143
|
const child = getAsChildElement(children, "Drawer.Close");
|
|
136
144
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137
|
-
|
|
145
|
+
drawer.Drawer.Close,
|
|
138
146
|
{
|
|
139
147
|
...htmlProps,
|
|
140
148
|
"data-drawer-close": true,
|
|
@@ -144,7 +152,19 @@ function DrawerClose({ children, asChild, className, ...htmlProps }) {
|
|
|
144
152
|
}
|
|
145
153
|
);
|
|
146
154
|
}
|
|
147
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
+
return /* @__PURE__ */ jsxRuntime.jsx(drawer.Drawer.Close, { ...htmlProps, "data-drawer-close": true, className, children });
|
|
156
|
+
}
|
|
157
|
+
function DrawerSwipeArea({ swipeDirection, disabled, className, ...htmlProps }) {
|
|
158
|
+
const classes = [Drawer_module.default.swipeArea, className].filter(Boolean).join(" ");
|
|
159
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
160
|
+
drawer.Drawer.SwipeArea,
|
|
161
|
+
{
|
|
162
|
+
...htmlProps,
|
|
163
|
+
swipeDirection,
|
|
164
|
+
disabled,
|
|
165
|
+
className: classes
|
|
166
|
+
}
|
|
167
|
+
);
|
|
148
168
|
}
|
|
149
169
|
const Drawer = Object.assign(DrawerRoot, {
|
|
150
170
|
Trigger: DrawerTrigger,
|
|
@@ -154,7 +174,8 @@ const Drawer = Object.assign(DrawerRoot, {
|
|
|
154
174
|
Description: DrawerDescription,
|
|
155
175
|
Body: DrawerBody,
|
|
156
176
|
Footer: DrawerFooter,
|
|
157
|
-
Close: DrawerClose
|
|
177
|
+
Close: DrawerClose,
|
|
178
|
+
SwipeArea: DrawerSwipeArea
|
|
158
179
|
});
|
|
159
180
|
exports.Drawer = Drawer;
|
|
160
181
|
exports.DrawerBody = DrawerBody;
|
|
@@ -164,5 +185,6 @@ exports.DrawerDescription = DrawerDescription;
|
|
|
164
185
|
exports.DrawerFooter = DrawerFooter;
|
|
165
186
|
exports.DrawerHeader = DrawerHeader;
|
|
166
187
|
exports.DrawerRoot = DrawerRoot;
|
|
188
|
+
exports.DrawerSwipeArea = DrawerSwipeArea;
|
|
167
189
|
exports.DrawerTitle = DrawerTitle;
|
|
168
190
|
exports.DrawerTrigger = DrawerTrigger;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Slide-in panel for navigation, forms, or supplementary content.
|
|
4
|
+
* Now backed by Base UI's stable Drawer (v1.3.0) with native swipe gestures.
|
|
4
5
|
* @see https://usefragments.com/components/drawer
|
|
5
6
|
*/
|
|
6
7
|
export interface DrawerProps {
|
|
@@ -11,9 +12,18 @@ export interface DrawerProps {
|
|
|
11
12
|
defaultOpen?: boolean;
|
|
12
13
|
/** Called when open state changes */
|
|
13
14
|
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
/** Called after open/close animation completes */
|
|
16
|
+
onOpenChangeComplete?: (open: boolean) => void;
|
|
14
17
|
/** Whether the drawer blocks interaction with the rest of the page.
|
|
15
18
|
* @default true */
|
|
16
|
-
modal?: boolean;
|
|
19
|
+
modal?: boolean | 'trap-focus';
|
|
20
|
+
/** Swipe direction to dismiss.
|
|
21
|
+
* @default derived from `side` prop on Content */
|
|
22
|
+
swipeDirection?: 'up' | 'down' | 'left' | 'right';
|
|
23
|
+
/** Preset snap-point heights for bottom-sheet drawers */
|
|
24
|
+
snapPoints?: number[];
|
|
25
|
+
/** Disable outside-click dismissal */
|
|
26
|
+
disablePointerDismissal?: boolean;
|
|
17
27
|
}
|
|
18
28
|
export interface DrawerContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
19
29
|
children: React.ReactNode;
|
|
@@ -52,7 +62,13 @@ export interface DrawerCloseProps extends React.ButtonHTMLAttributes<HTMLButtonE
|
|
|
52
62
|
children?: React.ReactNode;
|
|
53
63
|
asChild?: boolean;
|
|
54
64
|
}
|
|
55
|
-
|
|
65
|
+
export interface DrawerSwipeAreaProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
66
|
+
/** Swipe direction to open the drawer */
|
|
67
|
+
swipeDirection?: 'up' | 'down' | 'left' | 'right';
|
|
68
|
+
/** Disable swipe detection */
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
}
|
|
71
|
+
declare function DrawerRoot({ children, open, defaultOpen, onOpenChange, onOpenChangeComplete, modal, swipeDirection, snapPoints, disablePointerDismissal, }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
56
72
|
declare function DrawerTrigger({ children, asChild, className, ...htmlProps }: DrawerTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
57
73
|
declare function DrawerContent({ children, side, size, backdrop, initialFocus, className, ...htmlProps }: DrawerContentProps): import("react/jsx-runtime").JSX.Element;
|
|
58
74
|
declare function DrawerHeader({ children, className, ...htmlProps }: DrawerHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -61,6 +77,7 @@ declare function DrawerDescription({ children, className, ...htmlProps }: Drawer
|
|
|
61
77
|
declare function DrawerBody({ children, className, ...htmlProps }: DrawerBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
62
78
|
declare function DrawerFooter({ children, className, ...htmlProps }: DrawerFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
63
79
|
declare function DrawerClose({ children, asChild, className, ...htmlProps }: DrawerCloseProps): import("react/jsx-runtime").JSX.Element;
|
|
80
|
+
declare function DrawerSwipeArea({ swipeDirection, disabled, className, ...htmlProps }: DrawerSwipeAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
64
81
|
export declare const Drawer: typeof DrawerRoot & {
|
|
65
82
|
Trigger: typeof DrawerTrigger;
|
|
66
83
|
Content: typeof DrawerContent;
|
|
@@ -70,6 +87,7 @@ export declare const Drawer: typeof DrawerRoot & {
|
|
|
70
87
|
Body: typeof DrawerBody;
|
|
71
88
|
Footer: typeof DrawerFooter;
|
|
72
89
|
Close: typeof DrawerClose;
|
|
90
|
+
SwipeArea: typeof DrawerSwipeArea;
|
|
73
91
|
};
|
|
74
|
-
export { DrawerRoot, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter, DrawerClose, };
|
|
92
|
+
export { DrawerRoot, DrawerTrigger, DrawerContent, DrawerHeader, DrawerTitle, DrawerDescription, DrawerBody, DrawerFooter, DrawerClose, DrawerSwipeArea, };
|
|
75
93
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Drawer/index.tsx"],"names":[],"mappings":"A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} from "@base-ui/react/drawer";
|
|
4
4
|
import styles from "./Drawer.module.scss.js";
|
|
5
5
|
function getAsChildElement(children, componentName) {
|
|
6
6
|
if (!React.isValidElement(children)) {
|
|
@@ -34,15 +34,23 @@ function DrawerRoot({
|
|
|
34
34
|
open,
|
|
35
35
|
defaultOpen,
|
|
36
36
|
onOpenChange,
|
|
37
|
-
|
|
37
|
+
onOpenChangeComplete,
|
|
38
|
+
modal = true,
|
|
39
|
+
swipeDirection,
|
|
40
|
+
snapPoints,
|
|
41
|
+
disablePointerDismissal
|
|
38
42
|
}) {
|
|
39
43
|
return /* @__PURE__ */ jsx(
|
|
40
|
-
|
|
44
|
+
Drawer$1.Root,
|
|
41
45
|
{
|
|
42
46
|
open,
|
|
43
47
|
defaultOpen,
|
|
44
48
|
onOpenChange,
|
|
49
|
+
onOpenChangeComplete,
|
|
45
50
|
modal,
|
|
51
|
+
swipeDirection,
|
|
52
|
+
snapPoints,
|
|
53
|
+
disablePointerDismissal,
|
|
46
54
|
children
|
|
47
55
|
}
|
|
48
56
|
);
|
|
@@ -55,9 +63,9 @@ function DrawerTrigger({
|
|
|
55
63
|
}) {
|
|
56
64
|
if (asChild) {
|
|
57
65
|
const child = getAsChildElement(children, "Drawer.Trigger");
|
|
58
|
-
return /* @__PURE__ */ jsx(
|
|
66
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { ...htmlProps, className, render: child, children: null });
|
|
59
67
|
}
|
|
60
|
-
return /* @__PURE__ */ jsx(
|
|
68
|
+
return /* @__PURE__ */ jsx(Drawer$1.Trigger, { ...htmlProps, className, children });
|
|
61
69
|
}
|
|
62
70
|
function DrawerContent({
|
|
63
71
|
children,
|
|
@@ -74,9 +82,9 @@ function DrawerContent({
|
|
|
74
82
|
styles[`size-${size}`],
|
|
75
83
|
className
|
|
76
84
|
].filter(Boolean).join(" ");
|
|
77
|
-
return /* @__PURE__ */ jsxs(
|
|
78
|
-
backdrop && /* @__PURE__ */ jsx(
|
|
79
|
-
/* @__PURE__ */ jsx(
|
|
85
|
+
return /* @__PURE__ */ jsxs(Drawer$1.Portal, { children: [
|
|
86
|
+
backdrop && /* @__PURE__ */ jsx(Drawer$1.Backdrop, { className: styles.backdrop }),
|
|
87
|
+
/* @__PURE__ */ jsx(Drawer$1.Viewport, { className: styles.viewport, children: /* @__PURE__ */ jsx(Drawer$1.Popup, { initialFocus, ...htmlProps, "data-side": side, className: popupClasses, children: /* @__PURE__ */ jsx(Drawer$1.Content, { children }) }) })
|
|
80
88
|
] });
|
|
81
89
|
}
|
|
82
90
|
function DrawerHeader({ children, className, ...htmlProps }) {
|
|
@@ -85,11 +93,11 @@ function DrawerHeader({ children, className, ...htmlProps }) {
|
|
|
85
93
|
}
|
|
86
94
|
function DrawerTitle({ children, className, ...htmlProps }) {
|
|
87
95
|
const classes = [styles.title, className].filter(Boolean).join(" ");
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
96
|
+
return /* @__PURE__ */ jsx(Drawer$1.Title, { ...htmlProps, className: classes, children });
|
|
89
97
|
}
|
|
90
98
|
function DrawerDescription({ children, className, ...htmlProps }) {
|
|
91
99
|
const classes = [styles.description, className].filter(Boolean).join(" ");
|
|
92
|
-
return /* @__PURE__ */ jsx(
|
|
100
|
+
return /* @__PURE__ */ jsx(Drawer$1.Description, { ...htmlProps, className: classes, children });
|
|
93
101
|
}
|
|
94
102
|
function DrawerBody({ children, className, ...htmlProps }) {
|
|
95
103
|
const classes = [styles.body, className].filter(Boolean).join(" ");
|
|
@@ -102,7 +110,7 @@ function DrawerFooter({ children, className, ...htmlProps }) {
|
|
|
102
110
|
function DrawerClose({ children, asChild, className, ...htmlProps }) {
|
|
103
111
|
if (!children) {
|
|
104
112
|
return /* @__PURE__ */ jsx(
|
|
105
|
-
|
|
113
|
+
Drawer$1.Close,
|
|
106
114
|
{
|
|
107
115
|
...htmlProps,
|
|
108
116
|
"data-drawer-close": true,
|
|
@@ -115,7 +123,7 @@ function DrawerClose({ children, asChild, className, ...htmlProps }) {
|
|
|
115
123
|
if (asChild) {
|
|
116
124
|
const child = getAsChildElement(children, "Drawer.Close");
|
|
117
125
|
return /* @__PURE__ */ jsx(
|
|
118
|
-
|
|
126
|
+
Drawer$1.Close,
|
|
119
127
|
{
|
|
120
128
|
...htmlProps,
|
|
121
129
|
"data-drawer-close": true,
|
|
@@ -125,7 +133,19 @@ function DrawerClose({ children, asChild, className, ...htmlProps }) {
|
|
|
125
133
|
}
|
|
126
134
|
);
|
|
127
135
|
}
|
|
128
|
-
return /* @__PURE__ */ jsx(
|
|
136
|
+
return /* @__PURE__ */ jsx(Drawer$1.Close, { ...htmlProps, "data-drawer-close": true, className, children });
|
|
137
|
+
}
|
|
138
|
+
function DrawerSwipeArea({ swipeDirection, disabled, className, ...htmlProps }) {
|
|
139
|
+
const classes = [styles.swipeArea, className].filter(Boolean).join(" ");
|
|
140
|
+
return /* @__PURE__ */ jsx(
|
|
141
|
+
Drawer$1.SwipeArea,
|
|
142
|
+
{
|
|
143
|
+
...htmlProps,
|
|
144
|
+
swipeDirection,
|
|
145
|
+
disabled,
|
|
146
|
+
className: classes
|
|
147
|
+
}
|
|
148
|
+
);
|
|
129
149
|
}
|
|
130
150
|
const Drawer = Object.assign(DrawerRoot, {
|
|
131
151
|
Trigger: DrawerTrigger,
|
|
@@ -135,7 +155,8 @@ const Drawer = Object.assign(DrawerRoot, {
|
|
|
135
155
|
Description: DrawerDescription,
|
|
136
156
|
Body: DrawerBody,
|
|
137
157
|
Footer: DrawerFooter,
|
|
138
|
-
Close: DrawerClose
|
|
158
|
+
Close: DrawerClose,
|
|
159
|
+
SwipeArea: DrawerSwipeArea
|
|
139
160
|
});
|
|
140
161
|
export {
|
|
141
162
|
Drawer,
|
|
@@ -146,6 +167,7 @@ export {
|
|
|
146
167
|
DrawerFooter,
|
|
147
168
|
DrawerHeader,
|
|
148
169
|
DrawerRoot,
|
|
170
|
+
DrawerSwipeArea,
|
|
149
171
|
DrawerTitle,
|
|
150
172
|
DrawerTrigger
|
|
151
173
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const editor = "
|
|
4
|
-
const contentTextarea = "
|
|
5
|
-
const content = "
|
|
6
|
-
const toolbar = "
|
|
7
|
-
const toolbarGroup = "
|
|
8
|
-
const toolbarButton = "
|
|
9
|
-
const toolbarButtonActive = "
|
|
10
|
-
const separator = "
|
|
11
|
-
const statusIndicator = "
|
|
12
|
-
const statusError = "
|
|
13
|
-
const contentRich = "
|
|
14
|
-
const statusBar = "
|
|
15
|
-
const statusBarLeft = "
|
|
16
|
-
const statusBarRight = "
|
|
17
|
-
const statusBarItem = "
|
|
18
|
-
const statusBarItemWarning = "
|
|
19
|
-
const statusBarItemError = "
|
|
3
|
+
const editor = "_editor_zjtu1_1";
|
|
4
|
+
const contentTextarea = "_contentTextarea_zjtu1_19";
|
|
5
|
+
const content = "_content_zjtu1_19";
|
|
6
|
+
const toolbar = "_toolbar_zjtu1_38";
|
|
7
|
+
const toolbarGroup = "_toolbarGroup_zjtu1_49";
|
|
8
|
+
const toolbarButton = "_toolbarButton_zjtu1_55";
|
|
9
|
+
const toolbarButtonActive = "_toolbarButtonActive_zjtu1_110";
|
|
10
|
+
const separator = "_separator_zjtu1_121";
|
|
11
|
+
const statusIndicator = "_statusIndicator_zjtu1_129";
|
|
12
|
+
const statusError = "_statusError_zjtu1_142";
|
|
13
|
+
const contentRich = "_contentRich_zjtu1_152";
|
|
14
|
+
const statusBar = "_statusBar_zjtu1_275";
|
|
15
|
+
const statusBarLeft = "_statusBarLeft_zjtu1_285";
|
|
16
|
+
const statusBarRight = "_statusBarRight_zjtu1_291";
|
|
17
|
+
const statusBarItem = "_statusBarItem_zjtu1_298";
|
|
18
|
+
const statusBarItemWarning = "_statusBarItemWarning_zjtu1_305";
|
|
19
|
+
const statusBarItemError = "_statusBarItemError_zjtu1_310";
|
|
20
20
|
const styles = {
|
|
21
21
|
editor,
|
|
22
22
|
contentTextarea,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const editor = "
|
|
2
|
-
const contentTextarea = "
|
|
3
|
-
const content = "
|
|
4
|
-
const toolbar = "
|
|
5
|
-
const toolbarGroup = "
|
|
6
|
-
const toolbarButton = "
|
|
7
|
-
const toolbarButtonActive = "
|
|
8
|
-
const separator = "
|
|
9
|
-
const statusIndicator = "
|
|
10
|
-
const statusError = "
|
|
11
|
-
const contentRich = "
|
|
12
|
-
const statusBar = "
|
|
13
|
-
const statusBarLeft = "
|
|
14
|
-
const statusBarRight = "
|
|
15
|
-
const statusBarItem = "
|
|
16
|
-
const statusBarItemWarning = "
|
|
17
|
-
const statusBarItemError = "
|
|
1
|
+
const editor = "_editor_zjtu1_1";
|
|
2
|
+
const contentTextarea = "_contentTextarea_zjtu1_19";
|
|
3
|
+
const content = "_content_zjtu1_19";
|
|
4
|
+
const toolbar = "_toolbar_zjtu1_38";
|
|
5
|
+
const toolbarGroup = "_toolbarGroup_zjtu1_49";
|
|
6
|
+
const toolbarButton = "_toolbarButton_zjtu1_55";
|
|
7
|
+
const toolbarButtonActive = "_toolbarButtonActive_zjtu1_110";
|
|
8
|
+
const separator = "_separator_zjtu1_121";
|
|
9
|
+
const statusIndicator = "_statusIndicator_zjtu1_129";
|
|
10
|
+
const statusError = "_statusError_zjtu1_142";
|
|
11
|
+
const contentRich = "_contentRich_zjtu1_152";
|
|
12
|
+
const statusBar = "_statusBar_zjtu1_275";
|
|
13
|
+
const statusBarLeft = "_statusBarLeft_zjtu1_285";
|
|
14
|
+
const statusBarRight = "_statusBarRight_zjtu1_291";
|
|
15
|
+
const statusBarItem = "_statusBarItem_zjtu1_298";
|
|
16
|
+
const statusBarItemWarning = "_statusBarItemWarning_zjtu1_305";
|
|
17
|
+
const statusBarItemError = "_statusBarItemError_zjtu1_310";
|
|
18
18
|
const styles = {
|
|
19
19
|
editor,
|
|
20
20
|
contentTextarea,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const emptyState = "
|
|
4
|
-
const sm = "
|
|
5
|
-
const title = "
|
|
6
|
-
const description = "
|
|
7
|
-
const icon = "
|
|
8
|
-
const actions = "
|
|
9
|
-
const md = "
|
|
10
|
-
const lg = "
|
|
3
|
+
const emptyState = "_emptyState_1tx2d_1";
|
|
4
|
+
const sm = "_sm_1tx2d_11";
|
|
5
|
+
const title = "_title_1tx2d_14";
|
|
6
|
+
const description = "_description_1tx2d_17";
|
|
7
|
+
const icon = "_icon_1tx2d_21";
|
|
8
|
+
const actions = "_actions_1tx2d_24";
|
|
9
|
+
const md = "_md_1tx2d_28";
|
|
10
|
+
const lg = "_lg_1tx2d_45";
|
|
11
11
|
const styles = {
|
|
12
12
|
emptyState,
|
|
13
13
|
sm,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const emptyState = "
|
|
2
|
-
const sm = "
|
|
3
|
-
const title = "
|
|
4
|
-
const description = "
|
|
5
|
-
const icon = "
|
|
6
|
-
const actions = "
|
|
7
|
-
const md = "
|
|
8
|
-
const lg = "
|
|
1
|
+
const emptyState = "_emptyState_1tx2d_1";
|
|
2
|
+
const sm = "_sm_1tx2d_11";
|
|
3
|
+
const title = "_title_1tx2d_14";
|
|
4
|
+
const description = "_description_1tx2d_17";
|
|
5
|
+
const icon = "_icon_1tx2d_21";
|
|
6
|
+
const actions = "_actions_1tx2d_24";
|
|
7
|
+
const md = "_md_1tx2d_28";
|
|
8
|
+
const lg = "_lg_1tx2d_45";
|
|
9
9
|
const styles = {
|
|
10
10
|
emptyState,
|
|
11
11
|
sm,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const root = "
|
|
4
|
-
const label = "
|
|
5
|
-
const description = "
|
|
6
|
-
const error = "
|
|
3
|
+
const root = "_root_a26f9_1";
|
|
4
|
+
const label = "_label_a26f9_6";
|
|
5
|
+
const description = "_description_a26f9_17";
|
|
6
|
+
const error = "_error_a26f9_24";
|
|
7
7
|
const styles = {
|
|
8
8
|
root,
|
|
9
9
|
label,
|