@svadmin/ui 0.70.0 → 0.73.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 +40 -25
- package/THIRD_PARTY_NOTICES.md +52 -0
- package/dist/actions.js +1 -1
- package/dist/app.css +7804 -5188
- package/dist/app.theme.css +7738 -5173
- package/dist/class-properties.generated.d.ts +1 -0
- package/dist/class-properties.generated.js +2 -0
- package/dist/classnames.d.ts +8 -0
- package/dist/classnames.js +26 -0
- package/dist/component-registry.svelte.d.ts +33 -19
- package/dist/component-registry.svelte.js +6 -4
- package/dist/components/AdminApp.svelte +55 -53
- package/dist/components/AdminApp.svelte.d.ts +2 -2
- package/dist/components/ApiSettings.svelte +19 -1
- package/dist/components/AuditLogDrawer.svelte +14 -3
- package/dist/components/AutoForm.svelte +162 -50
- package/dist/components/AutoForm.svelte.d.ts +4 -0
- package/dist/components/AutoTable.svelte +599 -259
- package/dist/components/AutoTable.svelte.d.ts +6 -0
- package/dist/components/BoundRecordDetailDrawer.svelte +172 -0
- package/dist/components/BoundRecordDetailDrawer.svelte.d.ts +11 -0
- package/dist/components/Breadcrumbs.svelte +7 -4
- package/dist/components/CancelTaskButton.svelte +9 -5
- package/dist/components/ColumnHeaderFilter.svelte +4 -3
- package/dist/components/ColumnSettings.svelte +1 -0
- package/dist/components/ComboboxField.svelte +118 -36
- package/dist/components/ComboboxField.svelte.d.ts +5 -4
- package/dist/components/CreatePage.svelte +7 -1
- package/dist/components/CreatePage.svelte.d.ts +2 -0
- package/dist/components/DateRangeInput.svelte +75 -0
- package/dist/components/DateRangeInput.svelte.d.ts +25 -0
- package/dist/components/DateTimeInput.svelte +65 -0
- package/dist/components/DateTimeInput.svelte.d.ts +19 -0
- package/dist/components/DetailDrawer.svelte +4 -0
- package/dist/components/DetailDrawer.svelte.d.ts +1 -0
- package/dist/components/DevTools.svelte +8 -21
- package/dist/components/DraggableGrid.svelte +1 -0
- package/dist/components/DraggableHeader.svelte +5 -9
- package/dist/components/DraggableHeader.svelte.d.ts +43 -18
- package/dist/components/DraggableRowTable.svelte +2 -2
- package/dist/components/DynamicFormList.svelte +17 -17
- package/dist/components/DynamicFormList.svelte.d.ts +2 -1
- package/dist/components/EditPage.svelte +7 -1
- package/dist/components/EditPage.svelte.d.ts +2 -0
- package/dist/components/EditableTable.svelte +4 -0
- package/dist/components/ErrorPage.svelte +3 -1
- package/dist/components/FieldDisplay.svelte +14 -0
- package/dist/components/FieldDisplay.svelte.d.ts +7 -0
- package/dist/components/FieldRenderer.svelte +96 -20
- package/dist/components/FileUpload.svelte +250 -0
- package/dist/components/FileUpload.svelte.d.ts +32 -0
- package/dist/components/FilterBuilder.svelte +236 -268
- package/dist/components/FilterBuilder.svelte.d.ts +3 -0
- package/dist/components/FilterDropdown.svelte.d.ts +1 -1
- package/dist/components/Header.svelte +5 -6
- package/dist/components/ImportWizard.svelte +182 -94
- package/dist/components/InfiniteList.svelte +22 -8
- package/dist/components/InfiniteList.svelte.d.ts +5 -3
- package/dist/components/InlineEdit.svelte +114 -44
- package/dist/components/JsonSchemaForm.svelte +256 -95
- package/dist/components/JsonSchemaForm.svelte.d.ts +12 -1
- package/dist/components/Layout.svelte +20 -17
- package/dist/components/LazyTaskQueueDrawer.svelte +26 -0
- package/dist/components/LazyTaskQueueDrawer.svelte.d.ts +8 -0
- package/dist/components/ListPage.svelte +11 -6
- package/dist/components/ListPage.svelte.d.ts +2 -0
- package/dist/components/LoginPage.svelte +1 -1
- package/dist/components/MasterDetailView.svelte +3 -3
- package/dist/components/MediaLibraryModal.svelte +5 -2
- package/dist/components/MentionsInput.svelte +4 -3
- package/dist/components/MoneyInput.svelte +25 -0
- package/dist/components/MoneyInput.svelte.d.ts +20 -0
- package/dist/components/NavigateToResource.svelte +3 -2
- package/dist/components/NumberInput.svelte +25 -0
- package/dist/components/NumberInput.svelte.d.ts +19 -0
- package/dist/components/NumericInput.svelte +110 -0
- package/dist/components/NumericInput.svelte.d.ts +23 -0
- package/dist/components/PercentInput.svelte +25 -0
- package/dist/components/PercentInput.svelte.d.ts +20 -0
- package/dist/components/PermissionMatrix.svelte +4 -3
- package/dist/components/ProfilePage.svelte +2 -2
- package/dist/components/QuickEditDrawer.svelte +42 -0
- package/dist/components/QuickEditDrawer.svelte.d.ts +10 -0
- package/dist/components/RecordDetailDrawer.svelte +16 -108
- package/dist/components/RecordDetailDrawer.svelte.d.ts +2 -0
- package/dist/components/RecordRowActions.svelte +41 -0
- package/dist/components/RecordRowActions.svelte.d.ts +14 -0
- package/dist/components/ResourceAccessGuard.svelte +7 -5
- package/dist/components/ResourceOperationsPage.svelte +25 -19
- package/dist/components/ResourceOperationsPage.svelte.d.ts +5 -1
- package/dist/components/RetryTaskButton.svelte +9 -5
- package/dist/components/RowActions.svelte +5 -3
- package/dist/components/SensitiveDataMask.svelte +3 -3
- package/dist/components/SettingsPage.svelte +1 -1
- package/dist/components/ShowInferencer.svelte +4 -2
- package/dist/components/ShowInferencer.svelte.d.ts +2 -0
- package/dist/components/ShowPage.svelte +49 -39
- package/dist/components/ShowPage.svelte.d.ts +2 -0
- package/dist/components/Sidebar.svelte +15 -13
- package/dist/components/SplitPaneLayout.svelte +4 -2
- package/dist/components/SpreadsheetView.svelte +81 -286
- package/dist/components/StepsForm.svelte +166 -49
- package/dist/components/StepsForm.svelte.d.ts +1 -0
- package/dist/components/SvarAutoTable.svelte +39 -0
- package/dist/components/SvarAutoTable.svelte.d.ts +13 -0
- package/dist/components/SvarDataGrid.svelte +362 -0
- package/dist/components/SvarDataGrid.svelte.d.ts +57 -0
- package/dist/components/SvarGridCell.svelte +10 -0
- package/dist/components/SvarGridCell.svelte.d.ts +7 -0
- package/dist/components/SvarResourceRead.svelte +50 -0
- package/dist/components/SvarResourceRead.svelte.d.ts +23 -0
- package/dist/components/SvarResourceTable.svelte +63 -0
- package/dist/components/SvarResourceTable.svelte.d.ts +42 -0
- package/dist/components/SvarResourceTableView.svelte +364 -0
- package/dist/components/SvarResourceTableView.svelte.d.ts +4 -0
- package/dist/components/TaskDetails.svelte +20 -7
- package/dist/components/TaskList.svelte +19 -7
- package/dist/components/TaskQueueDrawer.svelte +92 -37
- package/dist/components/Toast.svelte +4 -2
- package/dist/components/TooltipButton.svelte +1 -1
- package/dist/components/TreeSelect.svelte +212 -30
- package/dist/components/TreeSelect.svelte.d.ts +3 -1
- package/dist/components/ValidatedField.svelte +27 -0
- package/dist/components/ValidatedField.svelte.d.ts +35 -0
- package/dist/components/account/ImportMembersPage.svelte +2 -2
- package/dist/components/account/SecurityLogPage.svelte +3 -1
- package/dist/components/account/SettingsEnterprisePage.svelte +7 -5
- package/dist/components/account/TeamMembersPage.svelte +1 -1
- package/dist/components/auto-table-grid.d.ts +26 -0
- package/dist/components/auto-table-grid.js +1 -0
- package/dist/components/buttons/CloneButton.svelte +6 -4
- package/dist/components/buttons/DeleteButton.svelte +95 -29
- package/dist/components/buttons/DeleteButton.svelte.d.ts +2 -0
- package/dist/components/buttons/EditButton.svelte +6 -4
- package/dist/components/buttons/ExportButton.svelte +22 -4
- package/dist/components/buttons/ImportButton.svelte +83 -38
- package/dist/components/buttons/ImportButton.svelte.d.ts +6 -10
- package/dist/components/buttons/RefreshButton.svelte +48 -8
- package/dist/components/buttons/ShowButton.svelte +6 -4
- package/dist/components/content/ApiKeyList.svelte +3 -1
- package/dist/components/content/ContentPageHeader.svelte +12 -9
- package/dist/components/content/ContentPageShell.svelte +8 -9
- package/dist/components/content/FileBrowser.svelte +35 -0
- package/dist/components/content/FileBrowser.svelte.d.ts +14 -0
- package/dist/components/content/FileList.svelte +3 -1
- package/dist/components/content/MemberList.svelte +3 -1
- package/dist/components/content/MetricBlock.svelte +10 -13
- package/dist/components/content/NetworkTable.svelte +6 -4
- package/dist/components/content/NetworkTable.svelte.d.ts +1 -0
- package/dist/components/content/PageToolbar.svelte +6 -10
- package/dist/components/content/SectionHeader.svelte +8 -13
- package/dist/components/content/SecurityEventTable.svelte +3 -1
- package/dist/components/content/SettingsFieldRow.svelte +9 -23
- package/dist/components/content/SettingsGroup.svelte +11 -27
- package/dist/components/content/StatusBadge.svelte +3 -8
- package/dist/components/content/StatusTabs.svelte +2 -2
- package/dist/components/content/WorkspaceLayout.svelte +8 -12
- package/dist/components/enterprise/filter-tree.d.ts +48 -0
- package/dist/components/enterprise/filter-tree.js +224 -0
- package/dist/components/enterprise/json-schema-form.d.ts +39 -0
- package/dist/components/enterprise/json-schema-form.js +195 -0
- package/dist/components/enterprise/recursive-schema-form.d.ts +30 -0
- package/dist/components/enterprise/recursive-schema-form.js +196 -0
- package/dist/components/enterprise/spreadsheet-formula.d.ts +12 -0
- package/dist/components/enterprise/spreadsheet-formula.js +245 -0
- package/dist/components/fieldComponentMap.d.ts +18 -13
- package/dist/components/fieldComponentMap.js +100 -47
- package/dist/components/fields/AvatarField.svelte +1 -1
- package/dist/components/fields/ChoiceField.svelte +16 -0
- package/dist/components/fields/ChoiceField.svelte.d.ts +10 -0
- package/dist/components/fields/CodeField.svelte +11 -12
- package/dist/components/fields/CodeField.svelte.d.ts +1 -1
- package/dist/components/fields/DateField.svelte +4 -3
- package/dist/components/fields/DateRangeField.svelte +2 -4
- package/dist/components/fields/ImageField.svelte +3 -1
- package/dist/components/fields/ImagesField.svelte +23 -0
- package/dist/components/fields/ImagesField.svelte.d.ts +6 -0
- package/dist/components/fields/JsonField.svelte +19 -13
- package/dist/components/fields/PasswordField.svelte +5 -0
- package/dist/components/fields/PasswordField.svelte.d.ts +6 -0
- package/dist/components/fields/date-field-value.d.ts +2 -0
- package/dist/components/fields/date-field-value.js +13 -0
- package/dist/components/fields/json-value.d.ts +11 -0
- package/dist/components/fields/json-value.js +28 -0
- package/dist/components/json-schema-form-state.d.ts +37 -0
- package/dist/components/json-schema-form-state.js +168 -0
- package/dist/components/profile/ActivityTimeline.svelte +2 -2
- package/dist/components/record-detail.svelte.d.ts +19 -0
- package/dist/components/record-detail.svelte.js +34 -0
- package/dist/components/saved-list-views.js +29 -29
- package/dist/components/svar-grid-cells.d.ts +14 -0
- package/dist/components/svar-grid-cells.js +2 -0
- package/dist/components/svar-grid-contract.d.ts +80 -0
- package/dist/components/svar-grid-contract.js +159 -0
- package/dist/components/svar-grid-interactions.d.ts +54 -0
- package/dist/components/svar-grid-interactions.js +174 -0
- package/dist/components/svar-grid-loading.d.ts +40 -0
- package/dist/components/svar-grid-loading.js +180 -0
- package/dist/components/svar-grid-operations.d.ts +37 -0
- package/dist/components/svar-grid-operations.js +186 -0
- package/dist/components/svar-grid-panes.d.ts +34 -0
- package/dist/components/svar-grid-panes.js +66 -0
- package/dist/components/svar-grid-resource-loading.d.ts +18 -0
- package/dist/components/svar-grid-resource-loading.js +68 -0
- package/dist/components/svar-grid-resource-session.svelte.d.ts +29 -0
- package/dist/components/svar-grid-resource-session.svelte.js +61 -0
- package/dist/components/table-contract.d.ts +13 -0
- package/dist/components/table-contract.js +42 -0
- package/dist/components/task-utils.js +4 -2
- package/dist/components/ui/alert/alert-variants.d.ts +2 -3
- package/dist/components/ui/alert/alert-variants.js +1 -2
- package/dist/components/ui/alert/alert.svelte +4 -5
- package/dist/components/ui/alert/alert.svelte.d.ts +3 -8
- package/dist/components/ui/alert/index.js +0 -2
- package/dist/components/ui/avatar/avatar-variants.d.ts +2 -3
- package/dist/components/ui/avatar/avatar-variants.js +1 -2
- package/dist/components/ui/avatar/avatar.svelte +5 -6
- package/dist/components/ui/avatar/avatar.svelte.d.ts +3 -8
- package/dist/components/ui/badge/badge-variants.d.ts +2 -3
- package/dist/components/ui/badge/badge-variants.js +3 -2
- package/dist/components/ui/badge/badge.svelte +4 -5
- package/dist/components/ui/badge/badge.svelte.d.ts +3 -8
- package/dist/components/ui/badge/index.js +0 -2
- package/dist/components/ui/button/button-variants.d.ts +2 -3
- package/dist/components/ui/button/button-variants.js +5 -3
- package/dist/components/ui/button/button.svelte +100 -44
- package/dist/components/ui/button/button.svelte.d.ts +8 -12
- package/dist/components/ui/button/index.js +0 -2
- package/dist/components/ui/command/command-dialog.svelte +3 -1
- package/dist/components/ui/command/command-dialog.svelte.d.ts +1 -1
- package/dist/components/ui/command/command-group.svelte +4 -2
- package/dist/components/ui/command/command-item.svelte +4 -2
- package/dist/components/ui/command/command-separator.svelte +3 -1
- package/dist/components/ui/command/index.d.ts +5 -5
- package/dist/components/ui/input/input.svelte +41 -24
- package/dist/components/ui/input/input.svelte.d.ts +5 -4
- package/dist/components/ui/sheet/sheet.svelte +9 -3
- package/dist/components/ui/sheet/sheet.svelte.d.ts +1 -0
- package/dist/components/ui/textarea/textarea.svelte +2 -1
- package/dist/components/ui/tooltip/tooltip.svelte +4 -2
- package/dist/components.css +3079 -0
- package/dist/design-contract.d.ts +13 -0
- package/dist/design-contract.js +11 -0
- package/dist/design-system.d.ts +15 -0
- package/dist/design-system.js +7 -0
- package/dist/index.d.ts +15 -1
- package/dist/index.js +9 -0
- package/dist/inline-value.d.ts +5 -0
- package/dist/inline-value.js +24 -0
- package/dist/numeric-input.d.ts +2 -0
- package/dist/numeric-input.js +9 -0
- package/dist/page-chrome.css +12 -49
- package/dist/recipes.d.ts +4 -0
- package/dist/recipes.js +4 -0
- package/dist/rendering/index.d.ts +87 -0
- package/dist/rendering/index.js +117 -0
- package/dist/styled-system/css/conditions.js +36 -0
- package/dist/styled-system/css/css.d.ts +22 -0
- package/dist/styled-system/css/css.js +45 -0
- package/dist/styled-system/css/cva.d.ts +6 -0
- package/dist/styled-system/css/cva.js +87 -0
- package/dist/styled-system/css/cx.d.ts +5 -0
- package/dist/styled-system/css/cx.js +15 -0
- package/dist/styled-system/css/index.d.ts +5 -0
- package/dist/styled-system/css/index.js +4 -0
- package/dist/styled-system/css/sva.d.ts +4 -0
- package/dist/styled-system/css/sva.js +46 -0
- package/dist/styled-system/helpers.js +316 -0
- package/dist/styled-system/patterns/aspect-ratio.d.ts +20 -0
- package/dist/styled-system/patterns/aspect-ratio.js +38 -0
- package/dist/styled-system/patterns/bleed.d.ts +21 -0
- package/dist/styled-system/patterns/bleed.js +24 -0
- package/dist/styled-system/patterns/box.d.ts +20 -0
- package/dist/styled-system/patterns/box.js +15 -0
- package/dist/styled-system/patterns/center.d.ts +20 -0
- package/dist/styled-system/patterns/center.js +21 -0
- package/dist/styled-system/patterns/circle.d.ts +20 -0
- package/dist/styled-system/patterns/circle.js +25 -0
- package/dist/styled-system/patterns/container.d.ts +20 -0
- package/dist/styled-system/patterns/container.js +21 -0
- package/dist/styled-system/patterns/cq.d.ts +21 -0
- package/dist/styled-system/patterns/cq.js +21 -0
- package/dist/styled-system/patterns/divider.d.ts +22 -0
- package/dist/styled-system/patterns/divider.js +25 -0
- package/dist/styled-system/patterns/flex.d.ts +26 -0
- package/dist/styled-system/patterns/flex.js +26 -0
- package/dist/styled-system/patterns/float.d.ts +23 -0
- package/dist/styled-system/patterns/float.js +52 -0
- package/dist/styled-system/patterns/grid-item.d.ts +25 -0
- package/dist/styled-system/patterns/grid-item.js +25 -0
- package/dist/styled-system/patterns/grid.d.ts +24 -0
- package/dist/styled-system/patterns/grid.js +27 -0
- package/dist/styled-system/patterns/hstack.d.ts +21 -0
- package/dist/styled-system/patterns/hstack.js +24 -0
- package/dist/styled-system/patterns/index.d.ts +21 -0
- package/dist/styled-system/patterns/index.js +20 -0
- package/dist/styled-system/patterns/link-overlay.d.ts +20 -0
- package/dist/styled-system/patterns/link-overlay.js +24 -0
- package/dist/styled-system/patterns/spacer.d.ts +20 -0
- package/dist/styled-system/patterns/spacer.js +25 -0
- package/dist/styled-system/patterns/square.d.ts +20 -0
- package/dist/styled-system/patterns/square.js +24 -0
- package/dist/styled-system/patterns/stack.d.ts +23 -0
- package/dist/styled-system/patterns/stack.js +24 -0
- package/dist/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/dist/styled-system/patterns/visually-hidden.js +18 -0
- package/dist/styled-system/patterns/vstack.d.ts +21 -0
- package/dist/styled-system/patterns/vstack.js +24 -0
- package/dist/styled-system/patterns/wrap.d.ts +24 -0
- package/dist/styled-system/patterns/wrap.js +25 -0
- package/dist/styled-system/recipes/content-header.d.ts +31 -0
- package/dist/styled-system/recipes/content-header.js +65 -0
- package/dist/styled-system/recipes/content-page.d.ts +34 -0
- package/dist/styled-system/recipes/content-page.js +43 -0
- package/dist/styled-system/recipes/create-recipe.js +82 -0
- package/dist/styled-system/recipes/index.d.ts +17 -0
- package/dist/styled-system/recipes/index.js +16 -0
- package/dist/styled-system/recipes/metric-block.d.ts +34 -0
- package/dist/styled-system/recipes/metric-block.js +76 -0
- package/dist/styled-system/recipes/product-list.d.ts +31 -0
- package/dist/styled-system/recipes/product-list.js +73 -0
- package/dist/styled-system/recipes/product-section.d.ts +31 -0
- package/dist/styled-system/recipes/product-section.js +49 -0
- package/dist/styled-system/recipes/product-settings-row.d.ts +34 -0
- package/dist/styled-system/recipes/product-settings-row.js +58 -0
- package/dist/styled-system/recipes/product-settings.d.ts +31 -0
- package/dist/styled-system/recipes/product-settings.js +57 -0
- package/dist/styled-system/recipes/product-status.d.ts +34 -0
- package/dist/styled-system/recipes/product-status.js +45 -0
- package/dist/styled-system/recipes/product-toolbar.d.ts +31 -0
- package/dist/styled-system/recipes/product-toolbar.js +41 -0
- package/dist/styled-system/recipes/product-workspace.d.ts +34 -0
- package/dist/styled-system/recipes/product-workspace.js +58 -0
- package/dist/styled-system/recipes/surface-metric.d.ts +38 -0
- package/dist/styled-system/recipes/surface-metric.js +63 -0
- package/dist/styled-system/recipes/surface-table.d.ts +34 -0
- package/dist/styled-system/recipes/surface-table.js +62 -0
- package/dist/styled-system/recipes/ui-badge.d.ts +31 -0
- package/dist/styled-system/recipes/ui-badge.js +38 -0
- package/dist/styled-system/recipes/ui-button.d.ts +32 -0
- package/dist/styled-system/recipes/ui-button.js +43 -0
- package/dist/styled-system/recipes/ui-input.d.ts +31 -0
- package/dist/styled-system/recipes/ui-input.js +49 -0
- package/dist/styled-system/recipes/ui-textarea.d.ts +31 -0
- package/dist/styled-system/recipes/ui-textarea.js +24 -0
- package/dist/styled-system/styles.css +1257 -0
- package/dist/styled-system/tokens/index.d.ts +9 -0
- package/dist/styled-system/tokens/index.js +268 -0
- package/dist/styled-system/tokens/tokens.d.ts +36 -0
- package/dist/styled-system/types/composition.d.ts +227 -0
- package/dist/styled-system/types/conditions.d.ts +236 -0
- package/dist/styled-system/types/csstype.d.ts +22570 -0
- package/dist/styled-system/types/index.d.ts +6 -0
- package/dist/styled-system/types/parts.d.ts +8 -0
- package/dist/styled-system/types/pattern.d.ts +78 -0
- package/dist/styled-system/types/prop-type.d.ts +223 -0
- package/dist/styled-system/types/recipe.d.ts +181 -0
- package/dist/styled-system/types/selectors.d.ts +59 -0
- package/dist/styled-system/types/static-css.d.ts +56 -0
- package/dist/styled-system/types/style-props.d.ts +8088 -0
- package/dist/styled-system/types/system-types.d.ts +151 -0
- package/dist/styles/aliases.css +49 -0
- package/dist/styles/compatibility.epilogue.css +384 -0
- package/dist/styles/compatibility.prelude.css +5513 -0
- package/dist/styles/conditional-states.css +28 -0
- package/dist/styles/conditional-utilities.css +22 -0
- package/dist/styles/recipes.css +1262 -0
- package/dist/types.d.ts +3 -3
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +38 -14
- package/styles-compatibility.json +12 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface SpacerProperties {
|
|
9
|
+
size?: ConditionalValue<Tokens["spacing"]>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface SpacerStyles extends SpacerProperties, DistributiveOmit<SystemStyleObject, keyof SpacerProperties > {}
|
|
13
|
+
|
|
14
|
+
interface SpacerPatternFn {
|
|
15
|
+
(styles?: SpacerStyles): string
|
|
16
|
+
raw: (styles?: SpacerStyles) => SystemStyleObject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const spacer: SpacerPatternFn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.js';
|
|
2
|
+
import { css } from '../css/index.js';
|
|
3
|
+
|
|
4
|
+
const spacerConfig = {
|
|
5
|
+
transform(props, { map, isCssUnit, isCssVar }) {
|
|
6
|
+
const { size, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
alignSelf: "stretch",
|
|
9
|
+
justifySelf: "stretch",
|
|
10
|
+
flex: map(size, (v) => {
|
|
11
|
+
if (v == null) return "1";
|
|
12
|
+
const val = isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
|
|
13
|
+
return `0 0 ${val}`;
|
|
14
|
+
}),
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
}}
|
|
18
|
+
|
|
19
|
+
export const getSpacerStyle = (styles = {}) => {
|
|
20
|
+
const _styles = getPatternStyles(spacerConfig, styles)
|
|
21
|
+
return spacerConfig.transform(_styles, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const spacer = (styles) => css(getSpacerStyle(styles))
|
|
25
|
+
spacer.raw = getSpacerStyle
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface SquareProperties {
|
|
9
|
+
size?: SystemProperties["width"]
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface SquareStyles extends SquareProperties, DistributiveOmit<SystemStyleObject, keyof SquareProperties > {}
|
|
13
|
+
|
|
14
|
+
interface SquarePatternFn {
|
|
15
|
+
(styles?: SquareStyles): string
|
|
16
|
+
raw: (styles?: SquareStyles) => SystemStyleObject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const square: SquarePatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.js';
|
|
2
|
+
import { css } from '../css/index.js';
|
|
3
|
+
|
|
4
|
+
const squareConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { size, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: "center",
|
|
11
|
+
flex: "0 0 auto",
|
|
12
|
+
width: size,
|
|
13
|
+
height: size,
|
|
14
|
+
...rest
|
|
15
|
+
};
|
|
16
|
+
}}
|
|
17
|
+
|
|
18
|
+
export const getSquareStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(squareConfig, styles)
|
|
20
|
+
return squareConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const square = (styles) => css(getSquareStyle(styles))
|
|
24
|
+
square.raw = getSquareStyle
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface StackProperties {
|
|
9
|
+
align?: SystemProperties["alignItems"]
|
|
10
|
+
justify?: SystemProperties["justifyContent"]
|
|
11
|
+
direction?: SystemProperties["flexDirection"]
|
|
12
|
+
gap?: SystemProperties["gap"]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface StackStyles extends StackProperties, DistributiveOmit<SystemStyleObject, keyof StackProperties > {}
|
|
16
|
+
|
|
17
|
+
interface StackPatternFn {
|
|
18
|
+
(styles?: StackStyles): string
|
|
19
|
+
raw: (styles?: StackStyles) => SystemStyleObject
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
export declare const stack: StackPatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.js';
|
|
2
|
+
import { css } from '../css/index.js';
|
|
3
|
+
|
|
4
|
+
const stackConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { align, justify, direction, gap, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexDirection: direction,
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
...rest
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{direction:'column',gap:'8px'}}
|
|
17
|
+
|
|
18
|
+
export const getStackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(stackConfig, styles)
|
|
20
|
+
return stackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const stack = (styles) => css(getStackStyle(styles))
|
|
24
|
+
stack.raw = getStackStyle
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface VisuallyHiddenProperties {
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface VisuallyHiddenStyles extends VisuallyHiddenProperties, DistributiveOmit<SystemStyleObject, keyof VisuallyHiddenProperties > {}
|
|
13
|
+
|
|
14
|
+
interface VisuallyHiddenPatternFn {
|
|
15
|
+
(styles?: VisuallyHiddenStyles): string
|
|
16
|
+
raw: (styles?: VisuallyHiddenStyles) => SystemStyleObject
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export declare const visuallyHidden: VisuallyHiddenPatternFn;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.js';
|
|
2
|
+
import { css } from '../css/index.js';
|
|
3
|
+
|
|
4
|
+
const visuallyHiddenConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
return {
|
|
7
|
+
srOnly: true,
|
|
8
|
+
...props
|
|
9
|
+
};
|
|
10
|
+
}}
|
|
11
|
+
|
|
12
|
+
export const getVisuallyHiddenStyle = (styles = {}) => {
|
|
13
|
+
const _styles = getPatternStyles(visuallyHiddenConfig, styles)
|
|
14
|
+
return visuallyHiddenConfig.transform(_styles, patternFns)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const visuallyHidden = (styles) => css(getVisuallyHiddenStyle(styles))
|
|
18
|
+
visuallyHidden.raw = getVisuallyHiddenStyle
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface VstackProperties {
|
|
9
|
+
justify?: SystemProperties["justifyContent"]
|
|
10
|
+
gap?: SystemProperties["gap"]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface VstackStyles extends VstackProperties, DistributiveOmit<SystemStyleObject, keyof VstackProperties > {}
|
|
14
|
+
|
|
15
|
+
interface VstackPatternFn {
|
|
16
|
+
(styles?: VstackStyles): string
|
|
17
|
+
raw: (styles?: VstackStyles) => SystemStyleObject
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export declare const vstack: VstackPatternFn;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.js';
|
|
2
|
+
import { css } from '../css/index.js';
|
|
3
|
+
|
|
4
|
+
const vstackConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { justify, gap, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
alignItems: "center",
|
|
10
|
+
justifyContent: justify,
|
|
11
|
+
gap,
|
|
12
|
+
flexDirection: "column",
|
|
13
|
+
...rest
|
|
14
|
+
};
|
|
15
|
+
},
|
|
16
|
+
defaultValues:{gap:'8px'}}
|
|
17
|
+
|
|
18
|
+
export const getVstackStyle = (styles = {}) => {
|
|
19
|
+
const _styles = getPatternStyles(vstackConfig, styles)
|
|
20
|
+
return vstackConfig.transform(_styles, patternFns)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const vstack = (styles) => css(getVstackStyle(styles))
|
|
24
|
+
vstack.raw = getVstackStyle
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { SystemStyleObject, ConditionalValue } from '../types/index';
|
|
3
|
+
import type { Properties } from '../types/csstype';
|
|
4
|
+
import type { SystemProperties } from '../types/style-props';
|
|
5
|
+
import type { DistributiveOmit } from '../types/system-types';
|
|
6
|
+
import type { Tokens } from '../tokens/index';
|
|
7
|
+
|
|
8
|
+
export interface WrapProperties {
|
|
9
|
+
gap?: SystemProperties["gap"]
|
|
10
|
+
rowGap?: SystemProperties["gap"]
|
|
11
|
+
columnGap?: SystemProperties["gap"]
|
|
12
|
+
align?: SystemProperties["alignItems"]
|
|
13
|
+
justify?: SystemProperties["justifyContent"]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface WrapStyles extends WrapProperties, DistributiveOmit<SystemStyleObject, keyof WrapProperties > {}
|
|
17
|
+
|
|
18
|
+
interface WrapPatternFn {
|
|
19
|
+
(styles?: WrapStyles): string
|
|
20
|
+
raw: (styles?: WrapStyles) => SystemStyleObject
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
export declare const wrap: WrapPatternFn;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.js';
|
|
2
|
+
import { css } from '../css/index.js';
|
|
3
|
+
|
|
4
|
+
const wrapConfig = {
|
|
5
|
+
transform(props) {
|
|
6
|
+
const { columnGap, rowGap, gap = columnGap || rowGap ? void 0 : "8px", align, justify, ...rest } = props;
|
|
7
|
+
return {
|
|
8
|
+
display: "flex",
|
|
9
|
+
flexWrap: "wrap",
|
|
10
|
+
alignItems: align,
|
|
11
|
+
justifyContent: justify,
|
|
12
|
+
gap,
|
|
13
|
+
columnGap,
|
|
14
|
+
rowGap,
|
|
15
|
+
...rest
|
|
16
|
+
};
|
|
17
|
+
}}
|
|
18
|
+
|
|
19
|
+
export const getWrapStyle = (styles = {}) => {
|
|
20
|
+
const _styles = getPatternStyles(wrapConfig, styles)
|
|
21
|
+
return wrapConfig.transform(_styles, patternFns)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const wrap = (styles) => css(getWrapStyle(styles))
|
|
25
|
+
wrap.raw = getWrapStyle
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface ContentHeaderVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type ContentHeaderVariantMap = {
|
|
10
|
+
[key in keyof ContentHeaderVariant]: Array<ContentHeaderVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
type ContentHeaderSlot = "root" | "breadcrumbs" | "currentCrumb" | "row" | "heading" | "eyebrow" | "title" | "description" | "actions"
|
|
14
|
+
|
|
15
|
+
export type ContentHeaderVariantProps = {
|
|
16
|
+
[key in keyof ContentHeaderVariant]?: ConditionalValue<ContentHeaderVariant[key]> | undefined
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ContentHeaderRecipe {
|
|
20
|
+
__slot: ContentHeaderSlot
|
|
21
|
+
__type: ContentHeaderVariantProps
|
|
22
|
+
(props?: ContentHeaderVariantProps): Pretty<Record<ContentHeaderSlot, string>>
|
|
23
|
+
raw: (props?: ContentHeaderVariantProps) => ContentHeaderVariantProps
|
|
24
|
+
variantMap: ContentHeaderVariantMap
|
|
25
|
+
variantKeys: Array<keyof ContentHeaderVariant>
|
|
26
|
+
splitVariantProps<Props extends ContentHeaderVariantProps>(props: Props): [ContentHeaderVariantProps, Pretty<DistributiveOmit<Props, keyof ContentHeaderVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: ContentHeaderVariantProps) => ContentHeaderVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export declare const contentHeader: ContentHeaderRecipe
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
|
|
2
|
+
import { createRecipe } from './create-recipe.js';
|
|
3
|
+
|
|
4
|
+
const contentHeaderDefaultVariants = {}
|
|
5
|
+
const contentHeaderCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const contentHeaderSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"content-header__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"breadcrumbs",
|
|
14
|
+
"content-header__breadcrumbs"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"currentCrumb",
|
|
18
|
+
"content-header__currentCrumb"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"row",
|
|
22
|
+
"content-header__row"
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"heading",
|
|
26
|
+
"content-header__heading"
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"eyebrow",
|
|
30
|
+
"content-header__eyebrow"
|
|
31
|
+
],
|
|
32
|
+
[
|
|
33
|
+
"title",
|
|
34
|
+
"content-header__title"
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
"description",
|
|
38
|
+
"content-header__description"
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"actions",
|
|
42
|
+
"content-header__actions"
|
|
43
|
+
]
|
|
44
|
+
]
|
|
45
|
+
const contentHeaderSlotFns = /* @__PURE__ */ contentHeaderSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, contentHeaderDefaultVariants, getSlotCompoundVariant(contentHeaderCompoundVariants, slotName))])
|
|
46
|
+
|
|
47
|
+
const contentHeaderFn = memo((props = {}) => {
|
|
48
|
+
return Object.fromEntries(contentHeaderSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
const contentHeaderVariantKeys = []
|
|
52
|
+
const getVariantProps = (variants) => ({ ...contentHeaderDefaultVariants, ...compact(variants) })
|
|
53
|
+
|
|
54
|
+
export const contentHeader = /* @__PURE__ */ Object.assign(contentHeaderFn, {
|
|
55
|
+
__recipe__: false,
|
|
56
|
+
__name__: 'contentHeader',
|
|
57
|
+
raw: (props) => props,
|
|
58
|
+
classNameMap: {},
|
|
59
|
+
variantKeys: contentHeaderVariantKeys,
|
|
60
|
+
variantMap: {},
|
|
61
|
+
splitVariantProps(props) {
|
|
62
|
+
return splitProps(props, contentHeaderVariantKeys)
|
|
63
|
+
},
|
|
64
|
+
getVariantProps
|
|
65
|
+
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface ContentPageVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
width: "narrow" | "default" | "wide"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type ContentPageVariantMap = {
|
|
13
|
+
[key in keyof ContentPageVariant]: Array<ContentPageVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type ContentPageSlot = "root"
|
|
17
|
+
|
|
18
|
+
export type ContentPageVariantProps = {
|
|
19
|
+
[key in keyof ContentPageVariant]?: ConditionalValue<ContentPageVariant[key]> | undefined
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ContentPageRecipe {
|
|
23
|
+
__slot: ContentPageSlot
|
|
24
|
+
__type: ContentPageVariantProps
|
|
25
|
+
(props?: ContentPageVariantProps): Pretty<Record<ContentPageSlot, string>>
|
|
26
|
+
raw: (props?: ContentPageVariantProps) => ContentPageVariantProps
|
|
27
|
+
variantMap: ContentPageVariantMap
|
|
28
|
+
variantKeys: Array<keyof ContentPageVariant>
|
|
29
|
+
splitVariantProps<Props extends ContentPageVariantProps>(props: Props): [ContentPageVariantProps, Pretty<DistributiveOmit<Props, keyof ContentPageVariantProps>>]
|
|
30
|
+
getVariantProps: (props?: ContentPageVariantProps) => ContentPageVariantProps
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export declare const contentPage: ContentPageRecipe
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
|
|
2
|
+
import { createRecipe } from './create-recipe.js';
|
|
3
|
+
|
|
4
|
+
const contentPageDefaultVariants = {
|
|
5
|
+
"width": "default"
|
|
6
|
+
}
|
|
7
|
+
const contentPageCompoundVariants = []
|
|
8
|
+
|
|
9
|
+
const contentPageSlotNames = [
|
|
10
|
+
[
|
|
11
|
+
"root",
|
|
12
|
+
"content-page__root"
|
|
13
|
+
]
|
|
14
|
+
]
|
|
15
|
+
const contentPageSlotFns = /* @__PURE__ */ contentPageSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, contentPageDefaultVariants, getSlotCompoundVariant(contentPageCompoundVariants, slotName))])
|
|
16
|
+
|
|
17
|
+
const contentPageFn = memo((props = {}) => {
|
|
18
|
+
return Object.fromEntries(contentPageSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const contentPageVariantKeys = [
|
|
22
|
+
"width"
|
|
23
|
+
]
|
|
24
|
+
const getVariantProps = (variants) => ({ ...contentPageDefaultVariants, ...compact(variants) })
|
|
25
|
+
|
|
26
|
+
export const contentPage = /* @__PURE__ */ Object.assign(contentPageFn, {
|
|
27
|
+
__recipe__: false,
|
|
28
|
+
__name__: 'contentPage',
|
|
29
|
+
raw: (props) => props,
|
|
30
|
+
classNameMap: {},
|
|
31
|
+
variantKeys: contentPageVariantKeys,
|
|
32
|
+
variantMap: {
|
|
33
|
+
"width": [
|
|
34
|
+
"narrow",
|
|
35
|
+
"default",
|
|
36
|
+
"wide"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
splitVariantProps(props) {
|
|
40
|
+
return splitProps(props, contentPageVariantKeys)
|
|
41
|
+
},
|
|
42
|
+
getVariantProps
|
|
43
|
+
})
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { finalizeConditions, sortConditions } from '../css/conditions.js';
|
|
2
|
+
import { css } from '../css/css.js';
|
|
3
|
+
import { assertCompoundVariant, getCompoundVariantCss } from '../css/cva.js';
|
|
4
|
+
import { cx } from '../css/cx.js';
|
|
5
|
+
import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.js';
|
|
6
|
+
|
|
7
|
+
export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
8
|
+
const getVariantProps = (variants) => {
|
|
9
|
+
return {
|
|
10
|
+
[name]: '__ignore__',
|
|
11
|
+
...defaultVariants,
|
|
12
|
+
...compact(variants),
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const recipeFn = (variants, withCompoundVariants = true) => {
|
|
17
|
+
const transform = (prop, value) => {
|
|
18
|
+
assertCompoundVariant(name, compoundVariants, variants, prop)
|
|
19
|
+
|
|
20
|
+
if (value === '__ignore__') {
|
|
21
|
+
return { className: name }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
value = withoutSpace(value)
|
|
25
|
+
return { className: `${name}--${prop}_${value}` }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const recipeCss = createCss({
|
|
29
|
+
|
|
30
|
+
conditions: {
|
|
31
|
+
shift: sortConditions,
|
|
32
|
+
finalize: finalizeConditions,
|
|
33
|
+
breakpoints: { keys: ["base"] }
|
|
34
|
+
},
|
|
35
|
+
utility: {
|
|
36
|
+
prefix: "svadmin",
|
|
37
|
+
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
38
|
+
transform,
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
const recipeStyles = getVariantProps(variants)
|
|
43
|
+
|
|
44
|
+
if (withCompoundVariants) {
|
|
45
|
+
const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
|
|
46
|
+
return cx(recipeCss(recipeStyles), css(compoundVariantStyles))
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
return recipeCss(recipeStyles)
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return {
|
|
53
|
+
recipeFn,
|
|
54
|
+
getVariantProps,
|
|
55
|
+
__getCompoundVariantCss__: (variants) => {
|
|
56
|
+
return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
|
|
57
|
+
},
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export const mergeRecipes = (recipeA, recipeB) => {
|
|
62
|
+
if (recipeA && !recipeB) return recipeA
|
|
63
|
+
if (!recipeA && recipeB) return recipeB
|
|
64
|
+
|
|
65
|
+
const recipeFn = (...args) => cx(recipeA(...args), recipeB(...args))
|
|
66
|
+
const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
|
|
67
|
+
const variantMap = variantKeys.reduce((acc, key) => {
|
|
68
|
+
acc[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
|
|
69
|
+
return acc
|
|
70
|
+
}, {})
|
|
71
|
+
|
|
72
|
+
return Object.assign(recipeFn, {
|
|
73
|
+
__recipe__: true,
|
|
74
|
+
__name__: `${recipeA.__name__} ${recipeB.__name__}`,
|
|
75
|
+
raw: (props) => props,
|
|
76
|
+
variantKeys,
|
|
77
|
+
variantMap,
|
|
78
|
+
splitVariantProps(props) {
|
|
79
|
+
return splitProps(props, variantKeys)
|
|
80
|
+
},
|
|
81
|
+
})
|
|
82
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
export * from './ui-button';
|
|
3
|
+
export * from './ui-badge';
|
|
4
|
+
export * from './ui-textarea';
|
|
5
|
+
export * from './surface-metric';
|
|
6
|
+
export * from './surface-table';
|
|
7
|
+
export * from './ui-input';
|
|
8
|
+
export * from './product-section';
|
|
9
|
+
export * from './product-toolbar';
|
|
10
|
+
export * from './product-workspace';
|
|
11
|
+
export * from './product-settings';
|
|
12
|
+
export * from './product-settings-row';
|
|
13
|
+
export * from './product-list';
|
|
14
|
+
export * from './product-status';
|
|
15
|
+
export * from './content-page';
|
|
16
|
+
export * from './content-header';
|
|
17
|
+
export * from './metric-block';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './ui-button.js';
|
|
2
|
+
export * from './ui-badge.js';
|
|
3
|
+
export * from './ui-textarea.js';
|
|
4
|
+
export * from './surface-metric.js';
|
|
5
|
+
export * from './surface-table.js';
|
|
6
|
+
export * from './ui-input.js';
|
|
7
|
+
export * from './product-section.js';
|
|
8
|
+
export * from './product-toolbar.js';
|
|
9
|
+
export * from './product-workspace.js';
|
|
10
|
+
export * from './product-settings.js';
|
|
11
|
+
export * from './product-settings-row.js';
|
|
12
|
+
export * from './product-list.js';
|
|
13
|
+
export * from './product-status.js';
|
|
14
|
+
export * from './content-page.js';
|
|
15
|
+
export * from './content-header.js';
|
|
16
|
+
export * from './metric-block.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface MetricBlockVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "neutral"
|
|
8
|
+
*/
|
|
9
|
+
trendTone: "positive" | "negative" | "warning" | "neutral"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type MetricBlockVariantMap = {
|
|
13
|
+
[key in keyof MetricBlockVariant]: Array<MetricBlockVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
type MetricBlockSlot = "root" | "header" | "label" | "icon" | "skeleton" | "value" | "meta" | "trend" | "detail"
|
|
17
|
+
|
|
18
|
+
export type MetricBlockVariantProps = {
|
|
19
|
+
[key in keyof MetricBlockVariant]?: ConditionalValue<MetricBlockVariant[key]> | undefined
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface MetricBlockRecipe {
|
|
23
|
+
__slot: MetricBlockSlot
|
|
24
|
+
__type: MetricBlockVariantProps
|
|
25
|
+
(props?: MetricBlockVariantProps): Pretty<Record<MetricBlockSlot, string>>
|
|
26
|
+
raw: (props?: MetricBlockVariantProps) => MetricBlockVariantProps
|
|
27
|
+
variantMap: MetricBlockVariantMap
|
|
28
|
+
variantKeys: Array<keyof MetricBlockVariant>
|
|
29
|
+
splitVariantProps<Props extends MetricBlockVariantProps>(props: Props): [MetricBlockVariantProps, Pretty<DistributiveOmit<Props, keyof MetricBlockVariantProps>>]
|
|
30
|
+
getVariantProps: (props?: MetricBlockVariantProps) => MetricBlockVariantProps
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export declare const metricBlock: MetricBlockRecipe
|