@usefragments/ui 1.0.2 → 1.2.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/README.md +16 -16
- package/dist/assets/fragments-wordmark.cjs +30 -0
- package/dist/assets/fragments-wordmark.d.ts +13 -0
- package/dist/assets/fragments-wordmark.d.ts.map +1 -0
- package/dist/assets/fragments-wordmark.js +30 -0
- package/dist/assets/ui.css +3234 -3116
- package/dist/components/Accordion/Accordion.module.scss.cjs +8 -8
- package/dist/components/Accordion/Accordion.module.scss.js +8 -8
- package/dist/components/Accordion/index.cjs +22 -10
- package/dist/components/Accordion/index.d.ts.map +1 -1
- package/dist/components/Accordion/index.js +22 -10
- package/dist/components/Alert/Alert.module.scss.cjs +13 -13
- package/dist/components/Alert/Alert.module.scss.js +13 -13
- package/dist/components/AppShell/AppShell.module.scss.cjs +22 -10
- package/dist/components/AppShell/AppShell.module.scss.js +22 -10
- package/dist/components/AppShell/index.cjs +1 -1
- package/dist/components/AppShell/index.js +1 -1
- 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 +16 -16
- package/dist/components/Badge/Badge.module.scss.js +16 -16
- 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 +13 -13
- package/dist/components/Button/Button.module.scss.js +13 -13
- package/dist/components/Card/Card.module.scss.cjs +17 -17
- package/dist/components/Card/Card.module.scss.js +17 -17
- package/dist/components/Card/index.d.ts +3 -3
- package/dist/components/Card/index.d.ts.map +1 -1
- package/dist/components/Chart/Chart.module.scss.cjs +15 -15
- package/dist/components/Chart/Chart.module.scss.js +15 -15
- package/dist/components/Checkbox/Checkbox.module.scss.cjs +11 -11
- package/dist/components/Checkbox/Checkbox.module.scss.js +11 -11
- 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/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/Combobox/Combobox.module.scss.cjs +23 -23
- package/dist/components/Combobox/Combobox.module.scss.js +23 -23
- package/dist/components/Combobox/index.cjs +106 -9
- package/dist/components/Combobox/index.d.ts.map +1 -1
- package/dist/components/Combobox/index.js +106 -9
- 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 +37 -34
- package/dist/components/DataTable/DataTable.module.scss.js +37 -34
- package/dist/components/DataTable/index.d.ts +3 -1
- package/dist/components/DataTable/index.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.module.scss.cjs +33 -33
- package/dist/components/DatePicker/DatePicker.module.scss.js +33 -33
- package/dist/components/DatePicker/index.d.ts +1 -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 +28 -28
- package/dist/components/Drawer/Drawer.module.scss.js +28 -28
- package/dist/components/Drawer/index.cjs +20 -3
- package/dist/components/Drawer/index.d.ts.map +1 -1
- package/dist/components/Drawer/index.js +20 -3
- 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/Field/index.cjs +10 -9
- package/dist/components/Field/index.d.ts +7 -7
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +10 -9
- 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 +44 -29
- package/dist/components/Header/Header.module.scss.js +44 -29
- package/dist/components/Header/index.cjs +56 -3
- package/dist/components/Header/index.d.ts +25 -3
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +56 -3
- package/dist/components/Icon/Icon.module.scss.cjs +8 -8
- package/dist/components/Icon/Icon.module.scss.js +8 -8
- package/dist/components/IconButton/IconButton.module.scss.cjs +8 -8
- package/dist/components/IconButton/IconButton.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/List/List.module.scss.cjs +19 -19
- package/dist/components/List/List.module.scss.js +19 -19
- 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/Main/Main.module.scss.cjs +26 -0
- package/dist/components/Main/Main.module.scss.js +26 -0
- package/dist/components/Main/index.cjs +128 -0
- package/dist/components/Main/index.d.ts +22 -0
- package/dist/components/Main/index.d.ts.map +1 -0
- package/dist/components/Main/index.js +111 -0
- package/dist/components/Markdown/Markdown.module.scss.cjs +1 -1
- package/dist/components/Markdown/Markdown.module.scss.js +1 -1
- package/dist/components/Menu/Menu.module.scss.cjs +14 -14
- package/dist/components/Menu/Menu.module.scss.js +14 -14
- 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/Popover/index.cjs +27 -2
- package/dist/components/Popover/index.d.ts.map +1 -1
- package/dist/components/Popover/index.js +27 -2
- 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 +18 -18
- package/dist/components/Prompt/Prompt.module.scss.js +18 -18
- package/dist/components/RadioGroup/RadioGroup.module.scss.cjs +17 -17
- package/dist/components/RadioGroup/RadioGroup.module.scss.js +17 -17
- package/dist/components/RadioGroup/index.cjs +2 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/RadioGroup/index.d.ts.map +1 -1
- package/dist/components/RadioGroup/index.js +2 -0
- 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/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/Skeleton/Skeleton.module.scss.cjs +38 -38
- package/dist/components/Skeleton/Skeleton.module.scss.js +38 -38
- package/dist/components/Slider/Slider.module.scss.cjs +12 -12
- package/dist/components/Slider/Slider.module.scss.js +12 -12
- package/dist/components/Table/Table.module.scss.cjs +19 -19
- package/dist/components/Table/Table.module.scss.js +19 -19
- package/dist/components/TableOfContents/TableOfContents.module.scss.cjs +15 -15
- package/dist/components/TableOfContents/TableOfContents.module.scss.js +15 -15
- package/dist/components/TableOfContents/index.cjs +22 -42
- package/dist/components/TableOfContents/index.d.ts +3 -3
- package/dist/components/TableOfContents/index.d.ts.map +1 -1
- package/dist/components/TableOfContents/index.js +22 -42
- package/dist/components/Tabs/Tabs.module.scss.cjs +12 -12
- package/dist/components/Tabs/Tabs.module.scss.js +12 -12
- package/dist/components/Text/Text.module.scss.cjs +51 -51
- package/dist/components/Text/Text.module.scss.js +51 -51
- 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 +13 -13
- package/dist/components/ThinkingIndicator/ThinkingIndicator.module.scss.js +13 -13
- package/dist/components/Toast/Toast.module.scss.cjs +21 -21
- package/dist/components/Toast/Toast.module.scss.js +21 -21
- 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/data-table.cjs +58 -41
- package/dist/data-table.js +59 -41
- package/dist/datepicker.cjs +32 -72
- package/dist/datepicker.js +32 -72
- package/dist/index.cjs +89 -85
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/fragments.json +1 -1
- package/package.json +9 -8
- package/src/assets/fragments-wordmark.tsx +47 -0
- package/src/components/Accordion/index.tsx +13 -3
- package/src/components/Alert/Alert.module.scss +15 -2
- package/src/components/AppShell/AppShell.module.scss +73 -15
- package/src/components/AppShell/index.tsx +1 -1
- package/src/components/Button/Button.module.scss +19 -20
- package/src/components/Card/Card.module.scss +3 -3
- package/src/components/Card/index.tsx +3 -3
- package/src/components/Checkbox/Checkbox.contract.json +5 -24
- package/src/components/Checkbox/Checkbox.module.scss +4 -2
- package/src/components/Chip/Chip.contract.json +11 -28
- package/src/components/Chip/Chip.module.scss +21 -45
- package/src/components/CodeBlock/CodeBlock.module.scss +2 -7
- package/src/components/Combobox/Combobox.contract.json +6 -24
- package/src/components/Combobox/Combobox.module.scss +3 -2
- package/src/components/Combobox/index.tsx +132 -6
- package/src/components/DataTable/DataTable.contract.json +16 -23
- package/src/components/DataTable/DataTable.module.scss +31 -8
- package/src/components/DataTable/index.tsx +25 -4
- package/src/components/DatePicker/index.tsx +32 -84
- package/src/components/Drawer/index.tsx +38 -12
- package/src/components/Field/index.tsx +35 -35
- package/src/components/Header/Header.contract.json +41 -1
- package/src/components/Header/Header.module.scss +40 -0
- package/src/components/Header/index.tsx +88 -2
- package/src/components/IconButton/IconButton.contract.json +120 -0
- package/src/components/Listbox/Listbox.module.scss +5 -4
- package/src/components/Main/Main.contract.json +79 -0
- package/src/components/Main/Main.module.scss +31 -0
- package/src/components/Main/index.tsx +124 -0
- package/src/components/Menu/Menu.module.scss +8 -10
- package/src/components/Popover/index.tsx +34 -2
- package/src/components/RadioGroup/RadioGroup.contract.json +13 -27
- package/src/components/RadioGroup/index.tsx +4 -0
- package/src/components/Select/Select.module.scss +13 -12
- package/src/components/Table/Table.module.scss +22 -5
- package/src/components/TableOfContents/TableOfContents.contract.json +6 -16
- package/src/components/TableOfContents/TableOfContents.module.scss +20 -14
- package/src/components/TableOfContents/index.tsx +27 -38
- package/src/components/Toast/Toast.module.scss +15 -2
- package/src/components/ToggleGroup/ToggleGroup.module.scss +4 -1
- package/src/index.ts +4 -0
- package/src/styles/globals.scss +13 -10
- package/src/tokens/_component-properties.scss +26 -0
- package/src/tokens/_computed.scss +22 -4
- package/src/tokens/_derive.scss +55 -6
- package/src/tokens/_palettes.scss +24 -0
- package/src/tokens/_seeds.scss +20 -12
- package/src/tokens/_variables.scss +110 -63
- package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts +0 -33
- package/dist/components/Cloud/DashboardLayoutPrototypes.shared.d.ts.map +0 -1
- package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts +0 -11
- package/dist/components/Cloud/DashboardLayoutPrototypes.shell.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts +0 -5
- package/dist/components/Cloud/PullRequestsPrototypes.content.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts +0 -4
- package/dist/components/Cloud/PullRequestsPrototypes.detail-panels.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts +0 -3
- package/dist/components/Cloud/PullRequestsPrototypes.detail.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts +0 -86
- package/dist/components/Cloud/PullRequestsPrototypes.id-data.d.ts.map +0 -1
- package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts +0 -2
- package/dist/components/Cloud/PullRequestsPrototypes.id-page.d.ts.map +0 -1
- package/src/components/Accordion/Accordion.stories.tsx +0 -106
- package/src/components/Alert/Alert.stories.tsx +0 -119
- package/src/components/AppShell/AppShell.stories.tsx +0 -156
- package/src/components/Avatar/Avatar.stories.tsx +0 -74
- package/src/components/Badge/Badge.stories.tsx +0 -92
- package/src/components/BentoGrid/BentoGrid.stories.tsx +0 -98
- package/src/components/Box/Box.stories.tsx +0 -150
- package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -87
- package/src/components/Button/Button.stories.tsx +0 -103
- package/src/components/ButtonGroup/ButtonGroup.stories.tsx +0 -97
- package/src/components/Card/Card.stories.tsx +0 -144
- package/src/components/Chart/Chart.stories.tsx +0 -119
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -68
- package/src/components/Chip/Chip.stories.tsx +0 -70
- package/src/components/Cloud/CloudGovernanceShell.module.scss +0 -88
- package/src/components/Cloud/CloudGovernanceShell.stories.tsx +0 -446
- package/src/components/Cloud/ControlSizing.module.scss +0 -49
- package/src/components/Cloud/ControlSizing.stories.tsx +0 -238
- package/src/components/Cloud/DashboardLayoutPrototypes.module.scss +0 -462
- package/src/components/Cloud/DashboardLayoutPrototypes.shared.tsx +0 -375
- package/src/components/Cloud/DashboardLayoutPrototypes.shell.tsx +0 -147
- package/src/components/Cloud/DashboardLayoutPrototypes.stories.tsx +0 -328
- package/src/components/Cloud/PullRequestsPrototypes.content.tsx +0 -283
- package/src/components/Cloud/PullRequestsPrototypes.detail-panels.tsx +0 -381
- package/src/components/Cloud/PullRequestsPrototypes.detail.tsx +0 -204
- package/src/components/Cloud/PullRequestsPrototypes.id-data.ts +0 -395
- package/src/components/Cloud/PullRequestsPrototypes.id-page.tsx +0 -349
- package/src/components/Cloud/PullRequestsPrototypes.stories.tsx +0 -81
- package/src/components/CodeBlock/CodeBlock.stories.tsx +0 -147
- package/src/components/Collapsible/Collapsible.stories.tsx +0 -94
- package/src/components/ColorPicker/ColorPicker.stories.tsx +0 -74
- package/src/components/Combobox/Combobox.stories.tsx +0 -133
- package/src/components/Command/Command.stories.tsx +0 -102
- package/src/components/ConversationList/ConversationList.stories.tsx +0 -93
- package/src/components/DataTable/DataTable.stories.tsx +0 -129
- package/src/components/DatePicker/DatePicker.stories.tsx +0 -129
- package/src/components/Dialog/Dialog.stories.tsx +0 -154
- package/src/components/Drawer/Drawer.stories.tsx +0 -144
- package/src/components/Editor/Editor.stories.tsx +0 -99
- package/src/components/EmptyState/EmptyState.stories.tsx +0 -97
- package/src/components/Field/Field.stories.tsx +0 -109
- package/src/components/Fieldset/Fieldset.stories.tsx +0 -116
- package/src/components/Form/Form.stories.tsx +0 -142
- package/src/components/Grid/Grid.stories.tsx +0 -125
- package/src/components/Header/Header.stories.tsx +0 -133
- package/src/components/Icon/Icon.stories.tsx +0 -80
- package/src/components/IconButton/IconButton.stories.tsx +0 -78
- package/src/components/Image/Image.stories.tsx +0 -109
- package/src/components/Input/Input.stories.tsx +0 -104
- package/src/components/Link/Link.stories.tsx +0 -67
- package/src/components/List/List.stories.tsx +0 -95
- package/src/components/Listbox/Listbox.stories.tsx +0 -81
- package/src/components/Loading/Loading.stories.tsx +0 -69
- package/src/components/Markdown/Markdown.stories.tsx +0 -75
- package/src/components/Menu/Menu.stories.tsx +0 -113
- package/src/components/Message/Message.stories.tsx +0 -85
- package/src/components/NavigationMenu/NavigationMenu.stories.tsx +0 -161
- package/src/components/Pagination/Pagination.stories.tsx +0 -81
- package/src/components/Popover/Popover.stories.tsx +0 -152
- package/src/components/Progress/Progress.stories.tsx +0 -64
- package/src/components/Prompt/Prompt.stories.tsx +0 -93
- package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -107
- package/src/components/ScrollArea/ScrollArea.stories.tsx +0 -97
- package/src/components/Select/Select.stories.tsx +0 -127
- package/src/components/Separator/Separator.stories.tsx +0 -84
- package/src/components/Sidebar/Sidebar.stories.tsx +0 -122
- package/src/components/Skeleton/Skeleton.stories.tsx +0 -80
- package/src/components/Slider/Slider.stories.tsx +0 -73
- package/src/components/Stack/Stack.stories.tsx +0 -73
- package/src/components/Switch/Switch.stories.tsx +0 -59
- package/src/components/Table/Table.stories.tsx +0 -219
- package/src/components/TableOfContents/TableOfContents.stories.tsx +0 -120
- package/src/components/Tabs/Tabs.stories.tsx +0 -136
- package/src/components/Text/Text.stories.tsx +0 -133
- package/src/components/Textarea/Textarea.stories.tsx +0 -107
- package/src/components/Theme/Theme.stories.tsx +0 -95
- package/src/components/ThinkingIndicator/ThinkingIndicator.stories.tsx +0 -85
- package/src/components/Toast/Toast.stories.tsx +0 -91
- package/src/components/ToggleGroup/ToggleGroup.stories.tsx +0 -114
- package/src/components/Tooltip/Tooltip.stories.tsx +0 -95
- package/src/components/VisuallyHidden/VisuallyHidden.stories.tsx +0 -78
|
@@ -80,8 +80,10 @@ function XIcon() {
|
|
|
80
80
|
}
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
|
+
const EMPTY_STATIC_LABELS = /* @__PURE__ */ new Map();
|
|
83
84
|
const ComboboxContext = React__namespace.createContext({
|
|
84
85
|
selectedValues: [],
|
|
86
|
+
staticLabels: EMPTY_STATIC_LABELS,
|
|
85
87
|
itemsRef: { current: /* @__PURE__ */ new Map() },
|
|
86
88
|
itemsVersion: 0,
|
|
87
89
|
incrementItemsVersion: () => {
|
|
@@ -91,6 +93,14 @@ const ComboboxContext = React__namespace.createContext({
|
|
|
91
93
|
},
|
|
92
94
|
size: "md"
|
|
93
95
|
});
|
|
96
|
+
const EMPTY_FILTERED_ITEM_INDICES = /* @__PURE__ */ new Map();
|
|
97
|
+
const ComboboxFilteredItemIndexContext = React__namespace.createContext(
|
|
98
|
+
EMPTY_FILTERED_ITEM_INDICES
|
|
99
|
+
);
|
|
100
|
+
function itemIndicesFromSerializedValues(serializedValues) {
|
|
101
|
+
const values = JSON.parse(serializedValues);
|
|
102
|
+
return new Map(values.map((value, index2) => [value, index2]));
|
|
103
|
+
}
|
|
94
104
|
function getNodeText(node) {
|
|
95
105
|
if (node == null || typeof node === "boolean") return "";
|
|
96
106
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
@@ -99,6 +109,60 @@ function getNodeText(node) {
|
|
|
99
109
|
return getNodeText(node.props.children);
|
|
100
110
|
return "";
|
|
101
111
|
}
|
|
112
|
+
function collectStaticItems(node) {
|
|
113
|
+
const items = [];
|
|
114
|
+
React__namespace.Children.forEach(node, (child) => {
|
|
115
|
+
if (!React__namespace.isValidElement(child)) return;
|
|
116
|
+
if (child.type === ComboboxItem) {
|
|
117
|
+
const props = child.props;
|
|
118
|
+
items.push({
|
|
119
|
+
label: getNodeText(props.children).trim() || props.value,
|
|
120
|
+
value: props.value
|
|
121
|
+
});
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
collectStaticItems(child.props.children).forEach(
|
|
125
|
+
(item) => items.push(item)
|
|
126
|
+
);
|
|
127
|
+
});
|
|
128
|
+
return items;
|
|
129
|
+
}
|
|
130
|
+
function filterStaticChildren(node, visibleValues) {
|
|
131
|
+
let visibleItemCount = 0;
|
|
132
|
+
let changed = false;
|
|
133
|
+
const filteredChildren = React__namespace.Children.map(node, (child) => {
|
|
134
|
+
if (!React__namespace.isValidElement(child)) return child;
|
|
135
|
+
if (child.type === ComboboxItem) {
|
|
136
|
+
const props2 = child.props;
|
|
137
|
+
if (visibleValues.has(props2.value)) {
|
|
138
|
+
visibleItemCount += 1;
|
|
139
|
+
return child;
|
|
140
|
+
}
|
|
141
|
+
changed = true;
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
const props = child.props;
|
|
145
|
+
if (props.children === void 0) return child;
|
|
146
|
+
const nested = filterStaticChildren(props.children, visibleValues);
|
|
147
|
+
visibleItemCount += nested.visibleItemCount;
|
|
148
|
+
if (child.type === ComboboxGroup && nested.visibleItemCount === 0) {
|
|
149
|
+
changed = true;
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
if (!nested.changed) return child;
|
|
153
|
+
changed = true;
|
|
154
|
+
return React__namespace.cloneElement(
|
|
155
|
+
child,
|
|
156
|
+
void 0,
|
|
157
|
+
nested.children
|
|
158
|
+
);
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
children: changed ? filteredChildren : node,
|
|
162
|
+
visibleItemCount,
|
|
163
|
+
changed
|
|
164
|
+
};
|
|
165
|
+
}
|
|
102
166
|
const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
103
167
|
children,
|
|
104
168
|
value,
|
|
@@ -125,6 +189,12 @@ const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
|
125
189
|
className
|
|
126
190
|
}, ref) {
|
|
127
191
|
const size = index.useResolvedControlSize(sizeProp);
|
|
192
|
+
const staticItems = React__namespace.useMemo(() => collectStaticItems(children), [children]);
|
|
193
|
+
const staticValues = React__namespace.useMemo(() => staticItems.map((item) => item.value), [staticItems]);
|
|
194
|
+
const staticLabels = React__namespace.useMemo(
|
|
195
|
+
() => new Map(staticItems.map((item) => [item.value, item.label])),
|
|
196
|
+
[staticItems]
|
|
197
|
+
);
|
|
128
198
|
const [internalValue, setInternalValue] = React__namespace.useState(
|
|
129
199
|
value ?? defaultValue ?? (multiple ? [] : null)
|
|
130
200
|
);
|
|
@@ -149,9 +219,10 @@ const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
|
149
219
|
},
|
|
150
220
|
[onOpenChange]
|
|
151
221
|
);
|
|
152
|
-
const itemToStringLabel = React__namespace.useCallback(
|
|
153
|
-
|
|
154
|
-
|
|
222
|
+
const itemToStringLabel = React__namespace.useCallback(
|
|
223
|
+
(itemValue) => staticLabels.get(itemValue) ?? itemsRef.current.get(itemValue) ?? itemValue,
|
|
224
|
+
[staticLabels]
|
|
225
|
+
);
|
|
155
226
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
156
227
|
const selectedValues = React__namespace.useMemo(() => {
|
|
157
228
|
if (currentValue == null) return [];
|
|
@@ -172,6 +243,7 @@ const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
|
172
243
|
placeholder,
|
|
173
244
|
multiple,
|
|
174
245
|
selectedValues,
|
|
246
|
+
staticLabels,
|
|
175
247
|
itemsRef,
|
|
176
248
|
itemsVersion,
|
|
177
249
|
incrementItemsVersion,
|
|
@@ -184,6 +256,7 @@ const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
|
184
256
|
placeholder,
|
|
185
257
|
multiple,
|
|
186
258
|
selectedValues,
|
|
259
|
+
staticLabels,
|
|
187
260
|
itemsVersion,
|
|
188
261
|
incrementItemsVersion,
|
|
189
262
|
explicitTriggerCount,
|
|
@@ -213,6 +286,7 @@ const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
|
213
286
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
214
287
|
combobox.Combobox.Root,
|
|
215
288
|
{
|
|
289
|
+
items: staticValues,
|
|
216
290
|
value: controlledValue2,
|
|
217
291
|
defaultValue: uncontrolledValue2,
|
|
218
292
|
onValueChange: handleValueChange2,
|
|
@@ -251,6 +325,7 @@ const ComboboxRoot = React__namespace.forwardRef(function ComboboxRoot2({
|
|
|
251
325
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
252
326
|
combobox.Combobox.Root,
|
|
253
327
|
{
|
|
328
|
+
items: staticValues,
|
|
254
329
|
value: controlledValue,
|
|
255
330
|
defaultValue: uncontrolledValue ?? null,
|
|
256
331
|
onValueChange: handleValueChange,
|
|
@@ -293,7 +368,7 @@ function ComboboxInput({
|
|
|
293
368
|
if (context.multiple) {
|
|
294
369
|
return /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.InputGroup, { className: wrapperClasses, children: [
|
|
295
370
|
context.selectedValues.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Chips, { className: Combobox_module.default.chips, children: context.selectedValues.map((chipValue) => /* @__PURE__ */ jsxRuntime.jsxs(combobox.Combobox.Chip, { className: Combobox_module.default.chip, children: [
|
|
296
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: Combobox_module.default.chipLabel, children: context.itemsRef.current.get(chipValue) ?? chipValue }),
|
|
371
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: Combobox_module.default.chipLabel, children: context.staticLabels.get(chipValue) ?? context.itemsRef.current.get(chipValue) ?? chipValue }),
|
|
297
372
|
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.ChipRemove, { className: Combobox_module.default.chipRemove, children: /* @__PURE__ */ jsxRuntime.jsx(XIcon, {}) })
|
|
298
373
|
] }, chipValue)) }),
|
|
299
374
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -336,6 +411,17 @@ function ComboboxContent({
|
|
|
336
411
|
...htmlProps
|
|
337
412
|
}) {
|
|
338
413
|
const popupClasses = [Combobox_module.default.popup, className].filter(Boolean).join(" ");
|
|
414
|
+
const filteredItems = combobox.Combobox.useFilteredItems();
|
|
415
|
+
const serializedFilteredItems = JSON.stringify(filteredItems);
|
|
416
|
+
const filteredItemIndices = React__namespace.useMemo(
|
|
417
|
+
() => itemIndicesFromSerializedValues(serializedFilteredItems),
|
|
418
|
+
[serializedFilteredItems]
|
|
419
|
+
);
|
|
420
|
+
const visibleValues = React__namespace.useMemo(() => new Set(filteredItems), [filteredItems]);
|
|
421
|
+
const filteredContent = React__namespace.useMemo(
|
|
422
|
+
() => filterStaticChildren(children, visibleValues),
|
|
423
|
+
[children, visibleValues]
|
|
424
|
+
);
|
|
339
425
|
const popupStyle = maxVisibleItems != null ? {
|
|
340
426
|
"--fui-select-max-items": maxVisibleItems + 0.5,
|
|
341
427
|
...htmlProps.style
|
|
@@ -347,12 +433,13 @@ function ComboboxContent({
|
|
|
347
433
|
sideOffset,
|
|
348
434
|
align,
|
|
349
435
|
className: Combobox_module.default.positioner,
|
|
350
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Popup, { ...htmlProps, className: popupClasses, style: popupStyle, children })
|
|
436
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.Popup, { ...htmlProps, className: popupClasses, style: popupStyle, children: /* @__PURE__ */ jsxRuntime.jsx(ComboboxFilteredItemIndexContext.Provider, { value: filteredItemIndices, children: filteredContent.children }) })
|
|
351
437
|
}
|
|
352
438
|
) });
|
|
353
439
|
}
|
|
354
440
|
function ComboboxItem({ children, value, disabled, className, ...htmlProps }) {
|
|
355
441
|
const { itemsRef, incrementItemsVersion } = React__namespace.useContext(ComboboxContext);
|
|
442
|
+
const filteredItemIndices = React__namespace.useContext(ComboboxFilteredItemIndexContext);
|
|
356
443
|
const classes = [Combobox_module.default.item, className].filter(Boolean).join(" ");
|
|
357
444
|
const label = React__namespace.useMemo(() => getNodeText(children).trim() || value, [children, value]);
|
|
358
445
|
React__namespace.useEffect(() => {
|
|
@@ -364,10 +451,20 @@ function ComboboxItem({ children, value, disabled, className, ...htmlProps }) {
|
|
|
364
451
|
incrementItemsVersion();
|
|
365
452
|
};
|
|
366
453
|
}, [itemsRef, incrementItemsVersion, value, label]);
|
|
367
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
454
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
455
|
+
combobox.Combobox.Item,
|
|
456
|
+
{
|
|
457
|
+
...htmlProps,
|
|
458
|
+
value,
|
|
459
|
+
index: filteredItemIndices.get(value),
|
|
460
|
+
disabled,
|
|
461
|
+
className: classes,
|
|
462
|
+
children: [
|
|
463
|
+
children,
|
|
464
|
+
/* @__PURE__ */ jsxRuntime.jsx(combobox.Combobox.ItemIndicator, { className: Combobox_module.default.itemIndicator, children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, {}) })
|
|
465
|
+
]
|
|
466
|
+
}
|
|
467
|
+
);
|
|
371
468
|
}
|
|
372
469
|
function ComboboxEmpty({ children, className, ...htmlProps }) {
|
|
373
470
|
const classes = [Combobox_module.default.empty, className].filter(Boolean).join(" ");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAiC,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAA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AAG,SAAS,EAAE,EAAE,kBAAkB,2CAO/E;AAED,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE,kBAAkB,2CAO/E;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,EAAE,uBAAuB,2CAOzF;AAMD,eAAO,MAAM,QAAQ;;;;;;;;;CASnB,CAAC;AAGH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,eAAe,EACf,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,kBAAkB,GACnB,CAAC"}
|
|
@@ -61,8 +61,10 @@ function XIcon() {
|
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
|
+
const EMPTY_STATIC_LABELS = /* @__PURE__ */ new Map();
|
|
64
65
|
const ComboboxContext = React.createContext({
|
|
65
66
|
selectedValues: [],
|
|
67
|
+
staticLabels: EMPTY_STATIC_LABELS,
|
|
66
68
|
itemsRef: { current: /* @__PURE__ */ new Map() },
|
|
67
69
|
itemsVersion: 0,
|
|
68
70
|
incrementItemsVersion: () => {
|
|
@@ -72,6 +74,14 @@ const ComboboxContext = React.createContext({
|
|
|
72
74
|
},
|
|
73
75
|
size: "md"
|
|
74
76
|
});
|
|
77
|
+
const EMPTY_FILTERED_ITEM_INDICES = /* @__PURE__ */ new Map();
|
|
78
|
+
const ComboboxFilteredItemIndexContext = React.createContext(
|
|
79
|
+
EMPTY_FILTERED_ITEM_INDICES
|
|
80
|
+
);
|
|
81
|
+
function itemIndicesFromSerializedValues(serializedValues) {
|
|
82
|
+
const values = JSON.parse(serializedValues);
|
|
83
|
+
return new Map(values.map((value, index) => [value, index]));
|
|
84
|
+
}
|
|
75
85
|
function getNodeText(node) {
|
|
76
86
|
if (node == null || typeof node === "boolean") return "";
|
|
77
87
|
if (typeof node === "string" || typeof node === "number") return String(node);
|
|
@@ -80,6 +90,60 @@ function getNodeText(node) {
|
|
|
80
90
|
return getNodeText(node.props.children);
|
|
81
91
|
return "";
|
|
82
92
|
}
|
|
93
|
+
function collectStaticItems(node) {
|
|
94
|
+
const items = [];
|
|
95
|
+
React.Children.forEach(node, (child) => {
|
|
96
|
+
if (!React.isValidElement(child)) return;
|
|
97
|
+
if (child.type === ComboboxItem) {
|
|
98
|
+
const props = child.props;
|
|
99
|
+
items.push({
|
|
100
|
+
label: getNodeText(props.children).trim() || props.value,
|
|
101
|
+
value: props.value
|
|
102
|
+
});
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
collectStaticItems(child.props.children).forEach(
|
|
106
|
+
(item) => items.push(item)
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
return items;
|
|
110
|
+
}
|
|
111
|
+
function filterStaticChildren(node, visibleValues) {
|
|
112
|
+
let visibleItemCount = 0;
|
|
113
|
+
let changed = false;
|
|
114
|
+
const filteredChildren = React.Children.map(node, (child) => {
|
|
115
|
+
if (!React.isValidElement(child)) return child;
|
|
116
|
+
if (child.type === ComboboxItem) {
|
|
117
|
+
const props2 = child.props;
|
|
118
|
+
if (visibleValues.has(props2.value)) {
|
|
119
|
+
visibleItemCount += 1;
|
|
120
|
+
return child;
|
|
121
|
+
}
|
|
122
|
+
changed = true;
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const props = child.props;
|
|
126
|
+
if (props.children === void 0) return child;
|
|
127
|
+
const nested = filterStaticChildren(props.children, visibleValues);
|
|
128
|
+
visibleItemCount += nested.visibleItemCount;
|
|
129
|
+
if (child.type === ComboboxGroup && nested.visibleItemCount === 0) {
|
|
130
|
+
changed = true;
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
if (!nested.changed) return child;
|
|
134
|
+
changed = true;
|
|
135
|
+
return React.cloneElement(
|
|
136
|
+
child,
|
|
137
|
+
void 0,
|
|
138
|
+
nested.children
|
|
139
|
+
);
|
|
140
|
+
});
|
|
141
|
+
return {
|
|
142
|
+
children: changed ? filteredChildren : node,
|
|
143
|
+
visibleItemCount,
|
|
144
|
+
changed
|
|
145
|
+
};
|
|
146
|
+
}
|
|
83
147
|
const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
84
148
|
children,
|
|
85
149
|
value,
|
|
@@ -106,6 +170,12 @@ const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
|
106
170
|
className
|
|
107
171
|
}, ref) {
|
|
108
172
|
const size = useResolvedControlSize(sizeProp);
|
|
173
|
+
const staticItems = React.useMemo(() => collectStaticItems(children), [children]);
|
|
174
|
+
const staticValues = React.useMemo(() => staticItems.map((item) => item.value), [staticItems]);
|
|
175
|
+
const staticLabels = React.useMemo(
|
|
176
|
+
() => new Map(staticItems.map((item) => [item.value, item.label])),
|
|
177
|
+
[staticItems]
|
|
178
|
+
);
|
|
109
179
|
const [internalValue, setInternalValue] = React.useState(
|
|
110
180
|
value ?? defaultValue ?? (multiple ? [] : null)
|
|
111
181
|
);
|
|
@@ -130,9 +200,10 @@ const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
|
130
200
|
},
|
|
131
201
|
[onOpenChange]
|
|
132
202
|
);
|
|
133
|
-
const itemToStringLabel = React.useCallback(
|
|
134
|
-
|
|
135
|
-
|
|
203
|
+
const itemToStringLabel = React.useCallback(
|
|
204
|
+
(itemValue) => staticLabels.get(itemValue) ?? itemsRef.current.get(itemValue) ?? itemValue,
|
|
205
|
+
[staticLabels]
|
|
206
|
+
);
|
|
136
207
|
const currentValue = value !== void 0 ? value : internalValue;
|
|
137
208
|
const selectedValues = React.useMemo(() => {
|
|
138
209
|
if (currentValue == null) return [];
|
|
@@ -153,6 +224,7 @@ const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
|
153
224
|
placeholder,
|
|
154
225
|
multiple,
|
|
155
226
|
selectedValues,
|
|
227
|
+
staticLabels,
|
|
156
228
|
itemsRef,
|
|
157
229
|
itemsVersion,
|
|
158
230
|
incrementItemsVersion,
|
|
@@ -165,6 +237,7 @@ const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
|
165
237
|
placeholder,
|
|
166
238
|
multiple,
|
|
167
239
|
selectedValues,
|
|
240
|
+
staticLabels,
|
|
168
241
|
itemsVersion,
|
|
169
242
|
incrementItemsVersion,
|
|
170
243
|
explicitTriggerCount,
|
|
@@ -194,6 +267,7 @@ const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
|
194
267
|
/* @__PURE__ */ jsxs(
|
|
195
268
|
Combobox$1.Root,
|
|
196
269
|
{
|
|
270
|
+
items: staticValues,
|
|
197
271
|
value: controlledValue2,
|
|
198
272
|
defaultValue: uncontrolledValue2,
|
|
199
273
|
onValueChange: handleValueChange2,
|
|
@@ -232,6 +306,7 @@ const ComboboxRoot = React.forwardRef(function ComboboxRoot2({
|
|
|
232
306
|
/* @__PURE__ */ jsxs(
|
|
233
307
|
Combobox$1.Root,
|
|
234
308
|
{
|
|
309
|
+
items: staticValues,
|
|
235
310
|
value: controlledValue,
|
|
236
311
|
defaultValue: uncontrolledValue ?? null,
|
|
237
312
|
onValueChange: handleValueChange,
|
|
@@ -274,7 +349,7 @@ function ComboboxInput({
|
|
|
274
349
|
if (context.multiple) {
|
|
275
350
|
return /* @__PURE__ */ jsxs(Combobox$1.InputGroup, { className: wrapperClasses, children: [
|
|
276
351
|
context.selectedValues.length > 0 && /* @__PURE__ */ jsx(Combobox$1.Chips, { className: styles.chips, children: context.selectedValues.map((chipValue) => /* @__PURE__ */ jsxs(Combobox$1.Chip, { className: styles.chip, children: [
|
|
277
|
-
/* @__PURE__ */ jsx("span", { className: styles.chipLabel, children: context.itemsRef.current.get(chipValue) ?? chipValue }),
|
|
352
|
+
/* @__PURE__ */ jsx("span", { className: styles.chipLabel, children: context.staticLabels.get(chipValue) ?? context.itemsRef.current.get(chipValue) ?? chipValue }),
|
|
278
353
|
/* @__PURE__ */ jsx(Combobox$1.ChipRemove, { className: styles.chipRemove, children: /* @__PURE__ */ jsx(XIcon, {}) })
|
|
279
354
|
] }, chipValue)) }),
|
|
280
355
|
/* @__PURE__ */ jsx(
|
|
@@ -317,6 +392,17 @@ function ComboboxContent({
|
|
|
317
392
|
...htmlProps
|
|
318
393
|
}) {
|
|
319
394
|
const popupClasses = [styles.popup, className].filter(Boolean).join(" ");
|
|
395
|
+
const filteredItems = Combobox$1.useFilteredItems();
|
|
396
|
+
const serializedFilteredItems = JSON.stringify(filteredItems);
|
|
397
|
+
const filteredItemIndices = React.useMemo(
|
|
398
|
+
() => itemIndicesFromSerializedValues(serializedFilteredItems),
|
|
399
|
+
[serializedFilteredItems]
|
|
400
|
+
);
|
|
401
|
+
const visibleValues = React.useMemo(() => new Set(filteredItems), [filteredItems]);
|
|
402
|
+
const filteredContent = React.useMemo(
|
|
403
|
+
() => filterStaticChildren(children, visibleValues),
|
|
404
|
+
[children, visibleValues]
|
|
405
|
+
);
|
|
320
406
|
const popupStyle = maxVisibleItems != null ? {
|
|
321
407
|
"--fui-select-max-items": maxVisibleItems + 0.5,
|
|
322
408
|
...htmlProps.style
|
|
@@ -328,12 +414,13 @@ function ComboboxContent({
|
|
|
328
414
|
sideOffset,
|
|
329
415
|
align,
|
|
330
416
|
className: styles.positioner,
|
|
331
|
-
children: /* @__PURE__ */ jsx(Combobox$1.Popup, { ...htmlProps, className: popupClasses, style: popupStyle, children })
|
|
417
|
+
children: /* @__PURE__ */ jsx(Combobox$1.Popup, { ...htmlProps, className: popupClasses, style: popupStyle, children: /* @__PURE__ */ jsx(ComboboxFilteredItemIndexContext.Provider, { value: filteredItemIndices, children: filteredContent.children }) })
|
|
332
418
|
}
|
|
333
419
|
) });
|
|
334
420
|
}
|
|
335
421
|
function ComboboxItem({ children, value, disabled, className, ...htmlProps }) {
|
|
336
422
|
const { itemsRef, incrementItemsVersion } = React.useContext(ComboboxContext);
|
|
423
|
+
const filteredItemIndices = React.useContext(ComboboxFilteredItemIndexContext);
|
|
337
424
|
const classes = [styles.item, className].filter(Boolean).join(" ");
|
|
338
425
|
const label = React.useMemo(() => getNodeText(children).trim() || value, [children, value]);
|
|
339
426
|
React.useEffect(() => {
|
|
@@ -345,10 +432,20 @@ function ComboboxItem({ children, value, disabled, className, ...htmlProps }) {
|
|
|
345
432
|
incrementItemsVersion();
|
|
346
433
|
};
|
|
347
434
|
}, [itemsRef, incrementItemsVersion, value, label]);
|
|
348
|
-
return /* @__PURE__ */ jsxs(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
435
|
+
return /* @__PURE__ */ jsxs(
|
|
436
|
+
Combobox$1.Item,
|
|
437
|
+
{
|
|
438
|
+
...htmlProps,
|
|
439
|
+
value,
|
|
440
|
+
index: filteredItemIndices.get(value),
|
|
441
|
+
disabled,
|
|
442
|
+
className: classes,
|
|
443
|
+
children: [
|
|
444
|
+
children,
|
|
445
|
+
/* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { className: styles.itemIndicator, children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
446
|
+
]
|
|
447
|
+
}
|
|
448
|
+
);
|
|
352
449
|
}
|
|
353
450
|
function ComboboxEmpty({ children, className, ...htmlProps }) {
|
|
354
451
|
const classes = [styles.empty, className].filter(Boolean).join(" ");
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const command = "
|
|
4
|
-
const inputWrapper = "
|
|
5
|
-
const input = "
|
|
6
|
-
const list = "
|
|
7
|
-
const item = "
|
|
8
|
-
const itemActive = "
|
|
9
|
-
const itemDisabled = "
|
|
10
|
-
const group = "
|
|
11
|
-
const groupHeading = "
|
|
12
|
-
const empty = "
|
|
13
|
-
const separator = "
|
|
3
|
+
const command = "_command_wjakp_1";
|
|
4
|
+
const inputWrapper = "_inputWrapper_wjakp_11";
|
|
5
|
+
const input = "_input_wjakp_11";
|
|
6
|
+
const list = "_list_wjakp_70";
|
|
7
|
+
const item = "_item_wjakp_76";
|
|
8
|
+
const itemActive = "_itemActive_wjakp_113";
|
|
9
|
+
const itemDisabled = "_itemDisabled_wjakp_118";
|
|
10
|
+
const group = "_group_wjakp_124";
|
|
11
|
+
const groupHeading = "_groupHeading_wjakp_128";
|
|
12
|
+
const empty = "_empty_wjakp_135";
|
|
13
|
+
const separator = "_separator_wjakp_142";
|
|
14
14
|
const styles = {
|
|
15
15
|
command,
|
|
16
16
|
inputWrapper,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const command = "
|
|
2
|
-
const inputWrapper = "
|
|
3
|
-
const input = "
|
|
4
|
-
const list = "
|
|
5
|
-
const item = "
|
|
6
|
-
const itemActive = "
|
|
7
|
-
const itemDisabled = "
|
|
8
|
-
const group = "
|
|
9
|
-
const groupHeading = "
|
|
10
|
-
const empty = "
|
|
11
|
-
const separator = "
|
|
1
|
+
const command = "_command_wjakp_1";
|
|
2
|
+
const inputWrapper = "_inputWrapper_wjakp_11";
|
|
3
|
+
const input = "_input_wjakp_11";
|
|
4
|
+
const list = "_list_wjakp_70";
|
|
5
|
+
const item = "_item_wjakp_76";
|
|
6
|
+
const itemActive = "_itemActive_wjakp_113";
|
|
7
|
+
const itemDisabled = "_itemDisabled_wjakp_118";
|
|
8
|
+
const group = "_group_wjakp_124";
|
|
9
|
+
const groupHeading = "_groupHeading_wjakp_128";
|
|
10
|
+
const empty = "_empty_wjakp_135";
|
|
11
|
+
const separator = "_separator_wjakp_142";
|
|
12
12
|
const styles = {
|
|
13
13
|
command,
|
|
14
14
|
inputWrapper,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const conversationList = "
|
|
4
|
-
const content = "
|
|
5
|
-
const loadingHistory = "
|
|
6
|
-
const dateSeparator = "
|
|
7
|
-
const dateSeparatorLine = "
|
|
8
|
-
const dateSeparatorText = "
|
|
9
|
-
const typingIndicator = "
|
|
10
|
-
const typingAvatar = "
|
|
11
|
-
const typingContent = "
|
|
12
|
-
const typingDot = "
|
|
3
|
+
const conversationList = "_conversationList_1w0ix_1";
|
|
4
|
+
const content = "_content_1w0ix_15";
|
|
5
|
+
const loadingHistory = "_loadingHistory_1w0ix_23";
|
|
6
|
+
const dateSeparator = "_dateSeparator_1w0ix_50";
|
|
7
|
+
const dateSeparatorLine = "_dateSeparatorLine_1w0ix_57";
|
|
8
|
+
const dateSeparatorText = "_dateSeparatorText_1w0ix_63";
|
|
9
|
+
const typingIndicator = "_typingIndicator_1w0ix_74";
|
|
10
|
+
const typingAvatar = "_typingAvatar_1w0ix_81";
|
|
11
|
+
const typingContent = "_typingContent_1w0ix_97";
|
|
12
|
+
const typingDot = "_typingDot_1w0ix_106";
|
|
13
13
|
const styles = {
|
|
14
14
|
conversationList,
|
|
15
15
|
content,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const conversationList = "
|
|
2
|
-
const content = "
|
|
3
|
-
const loadingHistory = "
|
|
4
|
-
const dateSeparator = "
|
|
5
|
-
const dateSeparatorLine = "
|
|
6
|
-
const dateSeparatorText = "
|
|
7
|
-
const typingIndicator = "
|
|
8
|
-
const typingAvatar = "
|
|
9
|
-
const typingContent = "
|
|
10
|
-
const typingDot = "
|
|
1
|
+
const conversationList = "_conversationList_1w0ix_1";
|
|
2
|
+
const content = "_content_1w0ix_15";
|
|
3
|
+
const loadingHistory = "_loadingHistory_1w0ix_23";
|
|
4
|
+
const dateSeparator = "_dateSeparator_1w0ix_50";
|
|
5
|
+
const dateSeparatorLine = "_dateSeparatorLine_1w0ix_57";
|
|
6
|
+
const dateSeparatorText = "_dateSeparatorText_1w0ix_63";
|
|
7
|
+
const typingIndicator = "_typingIndicator_1w0ix_74";
|
|
8
|
+
const typingAvatar = "_typingAvatar_1w0ix_81";
|
|
9
|
+
const typingContent = "_typingContent_1w0ix_97";
|
|
10
|
+
const typingDot = "_typingDot_1w0ix_106";
|
|
11
11
|
const styles = {
|
|
12
12
|
conversationList,
|
|
13
13
|
content,
|
|
@@ -1,39 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const wrapper = "
|
|
4
|
-
const table = "
|
|
5
|
-
const caption = "
|
|
6
|
-
const captionHidden = "
|
|
7
|
-
const sm = "
|
|
8
|
-
const th = "
|
|
9
|
-
const td = "
|
|
10
|
-
const md = "
|
|
11
|
-
const thead = "
|
|
12
|
-
const headerRow = "
|
|
13
|
-
const headerContent = "
|
|
14
|
-
const thSortable = "
|
|
15
|
-
const sortButton = "
|
|
16
|
-
const sortIndicator = "
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
3
|
+
const wrapper = "_wrapper_1nxxb_1";
|
|
4
|
+
const table = "_table_1nxxb_11";
|
|
5
|
+
const caption = "_caption_1nxxb_19";
|
|
6
|
+
const captionHidden = "_captionHidden_1nxxb_28";
|
|
7
|
+
const sm = "_sm_1nxxb_40";
|
|
8
|
+
const th = "_th_1nxxb_40";
|
|
9
|
+
const td = "_td_1nxxb_41";
|
|
10
|
+
const md = "_md_1nxxb_46";
|
|
11
|
+
const thead = "_thead_1nxxb_52";
|
|
12
|
+
const headerRow = "_headerRow_1nxxb_58";
|
|
13
|
+
const headerContent = "_headerContent_1nxxb_78";
|
|
14
|
+
const thSortable = "_thSortable_1nxxb_84";
|
|
15
|
+
const sortButton = "_sortButton_1nxxb_88";
|
|
16
|
+
const sortIndicator = "_sortIndicator_1nxxb_127";
|
|
17
|
+
const tbody = "_tbody_1nxxb_154";
|
|
18
|
+
const row = "_row_1nxxb_159";
|
|
19
|
+
const clickable = "_clickable_1nxxb_170";
|
|
20
|
+
const selected = "_selected_1nxxb_184";
|
|
21
|
+
const striped = "_striped_1nxxb_198";
|
|
22
|
+
const bordered = "_bordered_1nxxb_214";
|
|
23
|
+
const fixedLayout = "_fixedLayout_1nxxb_221";
|
|
24
|
+
const densityCondensed = "_densityCondensed_1nxxb_225";
|
|
25
|
+
const densityRegular = "_densityRegular_1nxxb_229";
|
|
26
|
+
const densityRelaxed = "_densityRelaxed_1nxxb_233";
|
|
27
|
+
const truncate = "_truncate_1nxxb_257";
|
|
28
|
+
const skeletonBar = "_skeletonBar_1nxxb_263";
|
|
29
|
+
const dataTableShimmer = "_dataTableShimmer_1nxxb_1";
|
|
30
|
+
const checkboxCell = "_checkboxCell_1nxxb_288";
|
|
31
|
+
const expandCell = "_expandCell_1nxxb_294";
|
|
32
|
+
const expandButton = "_expandButton_1nxxb_300";
|
|
33
|
+
const expandIcon = "_expandIcon_1nxxb_333";
|
|
34
|
+
const expandIconOpen = "_expandIconOpen_1nxxb_339";
|
|
35
|
+
const subRow = "_subRow_1nxxb_343";
|
|
36
|
+
const emptyState = "_emptyState_1nxxb_350";
|
|
37
|
+
const emptyMessage = "_emptyMessage_1nxxb_357";
|
|
37
38
|
const styles = {
|
|
38
39
|
wrapper,
|
|
39
40
|
table,
|
|
@@ -49,6 +50,7 @@ const styles = {
|
|
|
49
50
|
thSortable,
|
|
50
51
|
sortButton,
|
|
51
52
|
sortIndicator,
|
|
53
|
+
tbody,
|
|
52
54
|
row,
|
|
53
55
|
clickable,
|
|
54
56
|
selected,
|
|
@@ -99,6 +101,7 @@ exports.sortIndicator = sortIndicator;
|
|
|
99
101
|
exports.striped = striped;
|
|
100
102
|
exports.subRow = subRow;
|
|
101
103
|
exports.table = table;
|
|
104
|
+
exports.tbody = tbody;
|
|
102
105
|
exports.td = td;
|
|
103
106
|
exports.th = th;
|
|
104
107
|
exports.thSortable = thSortable;
|