@godxjp/ui 5.0.2 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -142
- package/package.json +124 -128
- package/scripts/ui-audit.mjs +179 -0
- package/src/app/__tests__/app-provider.test.tsx +232 -0
- package/src/app/__tests__/date-format-labels.test.ts +36 -0
- package/src/app/__tests__/date-formats.test.ts +44 -0
- package/src/app/__tests__/timezones.test.ts +65 -0
- package/src/app/app-provider.tsx +227 -0
- package/src/app/date-format-labels.ts +21 -0
- package/src/app/date-formats.ts +30 -0
- package/src/app/index.ts +40 -0
- package/src/app/locales.ts +32 -0
- package/src/app/request-headers.ts +31 -0
- package/src/app/storage.ts +44 -0
- package/src/app/time-format-labels.ts +19 -0
- package/src/app/time-formats.ts +15 -0
- package/src/app/timezones.ts +208 -0
- package/src/app/types.ts +39 -0
- package/src/app/use-formatting.ts +47 -0
- package/src/components/__tests__/accessibility-primitives.test.tsx +65 -0
- package/src/components/__tests__/docs-parity.test.ts +41 -0
- package/src/components/__tests__/shadcn-release-guardrails.test.ts +71 -0
- package/src/components/__tests__/theme-axes-integration.test.tsx +242 -0
- package/src/components/admin/index.ts +76 -0
- package/src/components/data-display/__tests__/card-table.test.tsx +328 -0
- package/src/components/data-display/__tests__/data-display.test.tsx +73 -0
- package/src/components/data-display/__tests__/data-table.test.tsx +84 -0
- package/src/components/data-display/__tests__/popover.test.tsx +92 -0
- package/src/components/data-display/__tests__/scroll-area-collapsible.test.tsx +66 -0
- package/src/components/data-display/badge.tsx +27 -0
- package/src/components/data-display/card.tsx +194 -0
- package/src/components/data-display/code-badge.tsx +28 -0
- package/src/components/data-display/collapsible.tsx +5 -0
- package/src/components/data-display/data-table.tsx +476 -0
- package/src/components/data-display/empty-state.tsx +22 -0
- package/src/components/data-display/index.ts +41 -0
- package/src/components/data-display/key-value-grid.tsx +46 -0
- package/src/components/data-display/popover.tsx +62 -0
- package/src/components/data-display/progress-meter.tsx +20 -0
- package/src/components/data-display/scan-panel.tsx +16 -0
- package/src/components/data-display/scroll-area.tsx +42 -0
- package/src/components/data-display/status-badge.tsx +83 -0
- package/src/components/data-display/table.tsx +59 -0
- package/src/components/data-display/timeline.tsx +42 -0
- package/src/components/data-display/tree-list.tsx +42 -0
- package/src/components/data-entry/__fixtures__/tree-options.ts +80 -0
- package/src/components/data-entry/__tests__/cascader-tree-transfer.test.tsx +417 -0
- package/src/components/data-entry/__tests__/checkbox-group.test.tsx +40 -0
- package/src/components/data-entry/__tests__/checkbox.test.tsx +20 -0
- package/src/components/data-entry/__tests__/date-autocomplete.test.tsx +94 -0
- package/src/components/data-entry/__tests__/form-field.test.tsx +49 -0
- package/src/components/data-entry/__tests__/input-textarea.test.tsx +38 -0
- package/src/components/data-entry/__tests__/label-select.test.tsx +62 -0
- package/src/components/data-entry/__tests__/pickers.test.tsx +74 -0
- package/src/components/data-entry/__tests__/radio.test.tsx +46 -0
- package/src/components/data-entry/__tests__/search-input.test.tsx +32 -0
- package/src/components/data-entry/__tests__/switch-field.test.tsx +52 -0
- package/src/components/data-entry/__tests__/upload.test.tsx +125 -0
- package/src/components/data-entry/autocomplete.tsx +91 -0
- package/src/components/data-entry/calendar.tsx +90 -0
- package/src/components/data-entry/cascader.tsx +305 -0
- package/src/components/data-entry/checkbox-group.tsx +90 -0
- package/src/components/data-entry/checkbox.tsx +30 -0
- package/src/components/data-entry/choice-field.tsx +27 -0
- package/src/components/data-entry/choice-option.ts +20 -0
- package/src/components/data-entry/color-picker.tsx +75 -0
- package/src/components/data-entry/command.tsx +56 -0
- package/src/components/data-entry/country-select.tsx +88 -0
- package/src/components/data-entry/date-picker.tsx +69 -0
- package/src/components/data-entry/date-range-picker.tsx +75 -0
- package/src/components/data-entry/form-field.tsx +59 -0
- package/src/components/data-entry/index.ts +62 -0
- package/src/components/data-entry/input.tsx +26 -0
- package/src/components/data-entry/label.tsx +25 -0
- package/src/components/data-entry/radio.tsx +109 -0
- package/src/components/data-entry/search-input.tsx +103 -0
- package/src/components/data-entry/select.tsx +149 -0
- package/src/components/data-entry/slider.tsx +38 -0
- package/src/components/data-entry/switch-field.tsx +91 -0
- package/src/components/data-entry/switch.tsx +24 -0
- package/src/components/data-entry/textarea.tsx +12 -0
- package/src/components/data-entry/time-picker.tsx +214 -0
- package/src/components/data-entry/transfer.tsx +231 -0
- package/src/components/data-entry/tree-select-strategy.ts +6 -0
- package/src/components/data-entry/tree-select.tsx +279 -0
- package/src/components/data-entry/tree-utils.ts +221 -0
- package/src/components/data-entry/upload-crop-dialog.tsx +109 -0
- package/src/components/data-entry/upload-types.ts +86 -0
- package/src/components/data-entry/upload.tsx +498 -0
- package/src/components/data-entry/use-upload-draft.ts +93 -0
- package/src/components/feedback/__tests__/alert.test.tsx +127 -0
- package/src/components/feedback/__tests__/dialog.test.tsx +290 -0
- package/src/components/feedback/__tests__/sheet.test.tsx +94 -0
- package/src/components/feedback/__tests__/skeleton.test.tsx +25 -0
- package/src/components/feedback/__tests__/toast.test.tsx +52 -0
- package/src/components/feedback/alert.tsx +167 -0
- package/src/components/feedback/dialog.tsx +325 -0
- package/src/components/feedback/index.ts +53 -0
- package/src/components/feedback/sheet.tsx +130 -0
- package/src/components/feedback/skeleton.tsx +95 -0
- package/src/components/feedback/sonner.tsx +54 -0
- package/src/components/feedback/toaster.tsx +1 -0
- package/src/components/feedback/use-toast.ts +62 -0
- package/src/components/general/__tests__/button.test.tsx +71 -0
- package/src/components/general/button.tsx +61 -0
- package/src/components/general/index.ts +2 -0
- package/src/components/layout/__tests__/page-container.test.tsx +69 -0
- package/src/components/layout/__tests__/page-inset.test.tsx +14 -0
- package/src/components/layout/__tests__/stack-inline.test.tsx +39 -0
- package/src/components/layout/app-shell.tsx +42 -0
- package/src/components/layout/breadcrumb.tsx +35 -0
- package/src/components/layout/index.ts +31 -0
- package/src/components/layout/inline.tsx +13 -0
- package/src/components/layout/menu.tsx +34 -0
- package/src/components/layout/mobile-frame.tsx +57 -0
- package/src/components/layout/page-container.tsx +81 -0
- package/src/components/layout/page-inset.tsx +16 -0
- package/src/components/layout/responsive-grid.tsx +14 -0
- package/src/components/layout/shell-app.tsx +30 -0
- package/src/components/layout/sidebar.tsx +98 -0
- package/src/components/layout/split-pane.tsx +16 -0
- package/src/components/layout/stack.tsx +13 -0
- package/src/components/layout/topbar.tsx +108 -0
- package/src/components/navigation/__tests__/app-pickers.test.tsx +118 -0
- package/src/components/navigation/__tests__/dropdown-menu.test.tsx +104 -0
- package/src/components/navigation/__tests__/navigation.test.tsx +61 -0
- package/src/components/navigation/__tests__/pagination-steps-tabs.test.tsx +76 -0
- package/src/components/navigation/date-format-picker.tsx +55 -0
- package/src/components/navigation/dropdown-menu.tsx +190 -0
- package/src/components/navigation/filter-bar.tsx +38 -0
- package/src/components/navigation/index.ts +28 -0
- package/src/components/navigation/locale-picker.tsx +49 -0
- package/src/components/navigation/page-header.tsx +50 -0
- package/src/components/navigation/pagination-utils.ts +35 -0
- package/src/components/navigation/pagination.tsx +168 -0
- package/src/components/navigation/steps.tsx +163 -0
- package/src/components/navigation/tabs-items.tsx +69 -0
- package/src/components/navigation/tabs.tsx +67 -0
- package/src/components/navigation/time-format-picker.tsx +55 -0
- package/src/components/navigation/timezone-picker.tsx +63 -0
- package/src/components/query/__tests__/data-state.test.tsx +214 -0
- package/src/components/query/__tests__/infinite-prefetch.test.tsx +105 -0
- package/src/components/query/__tests__/query-helpers.test.tsx +61 -0
- package/src/components/query/data-state.tsx +58 -0
- package/src/components/query/index.ts +10 -0
- package/src/components/query/infinite-query-state.tsx +99 -0
- package/src/components/query/mutation-feedback.tsx +31 -0
- package/src/components/query/prefetch-link.tsx +45 -0
- package/src/components/query/query-refetch-button.tsx +41 -0
- package/src/components/ui/alert-dialog.tsx +1 -0
- package/src/components/ui/alert.tsx +1 -0
- package/src/components/ui/autocomplete.tsx +1 -0
- package/src/components/ui/badge.tsx +1 -0
- package/src/components/ui/button.tsx +1 -0
- package/src/components/ui/calendar.tsx +1 -0
- package/src/components/ui/card.tsx +1 -0
- package/src/components/ui/checkbox.tsx +1 -0
- package/src/components/ui/color-picker.tsx +1 -0
- package/src/components/ui/command.tsx +1 -0
- package/src/components/ui/date-picker.tsx +1 -0
- package/src/components/ui/date-range-picker.tsx +1 -0
- package/src/components/ui/dialog.tsx +1 -0
- package/src/components/ui/dropdown-menu.tsx +1 -0
- package/src/components/ui/index.tsx +31 -0
- package/src/components/ui/input.tsx +1 -0
- package/src/components/ui/label.tsx +1 -0
- package/src/components/ui/pagination.tsx +1 -0
- package/src/components/ui/popover.tsx +1 -0
- package/src/components/ui/radio.tsx +1 -0
- package/src/components/ui/scroll-area.tsx +1 -0
- package/src/components/ui/select.tsx +1 -0
- package/src/components/ui/sheet.tsx +1 -0
- package/src/components/ui/slider.tsx +1 -0
- package/src/components/ui/sonner.tsx +1 -0
- package/src/components/ui/switch.tsx +1 -0
- package/src/components/ui/table.tsx +1 -0
- package/src/components/ui/tabs-items.tsx +1 -0
- package/src/components/ui/tabs.tsx +1 -0
- package/src/components/ui/textarea.tsx +1 -0
- package/src/components/ui/time-picker.tsx +1 -0
- package/src/components/ui/upload.tsx +1 -0
- package/src/form/__tests__/use-zod-form.test.tsx +97 -0
- package/src/form/form-field-control.tsx +44 -0
- package/src/form/form-root.tsx +29 -0
- package/src/form/index.ts +7 -0
- package/src/form/use-zod-form.ts +29 -0
- package/src/i18n/__tests__/translate.test.ts +23 -0
- package/src/i18n/index.ts +9 -0
- package/src/i18n/messages/en.json +171 -0
- package/src/i18n/messages/ja.json +171 -0
- package/src/i18n/messages/vi.json +171 -0
- package/src/i18n/translate.ts +74 -0
- package/src/i18n/use-translation.ts +53 -0
- package/src/index.ts +3 -0
- package/src/lib/__tests__/control-styles.test.ts +78 -0
- package/src/lib/__tests__/datetime.test.ts +77 -0
- package/src/lib/__tests__/format-date.test.ts +97 -0
- package/src/lib/__tests__/format.test.ts +62 -0
- package/src/lib/__tests__/theme-tokens-audit.test.ts +176 -0
- package/src/lib/__tests__/theme-tokens-css.test.ts +118 -0
- package/src/lib/__tests__/token-governance.test.ts +191 -0
- package/src/lib/__tests__/variants.test.ts +18 -0
- package/src/lib/control-styles.ts +33 -0
- package/src/lib/datetime/detect.ts +25 -0
- package/src/lib/datetime/format-date.ts +100 -0
- package/src/lib/datetime/format.ts +140 -0
- package/src/lib/datetime/index.ts +25 -0
- package/src/lib/datetime/parse.ts +51 -0
- package/src/lib/datetime/sync.ts +48 -0
- package/src/lib/format.ts +114 -0
- package/src/lib/hooks.ts +54 -0
- package/src/lib/utils.ts +6 -0
- package/src/lib/variants.ts +40 -0
- package/src/props/components/app.prop.ts +99 -0
- package/src/props/components/data-display.prop.ts +73 -0
- package/src/props/components/data-entry.prop.ts +334 -0
- package/src/props/components/feedback.prop.ts +80 -0
- package/src/props/components/form.prop.ts +46 -0
- package/src/props/components/general.prop.ts +18 -0
- package/src/props/components/index.ts +99 -0
- package/src/props/components/layout.prop.ts +130 -0
- package/src/props/components/navigation.prop.ts +88 -0
- package/src/props/components/query.prop.ts +94 -0
- package/src/props/index.ts +17 -0
- package/src/props/registry.ts +603 -0
- package/src/props/vocabulary/content.prop.ts +35 -0
- package/src/props/vocabulary/data.prop.ts +46 -0
- package/src/props/vocabulary/index.ts +73 -0
- package/src/props/vocabulary/interaction.prop.ts +42 -0
- package/src/props/vocabulary/layout.prop.ts +25 -0
- package/src/props/vocabulary/navigation.prop.ts +19 -0
- package/src/props/vocabulary/shared.prop.ts +59 -0
- package/src/styles/alert-layout.css +191 -0
- package/src/styles/badge-layout.css +22 -0
- package/src/styles/card-layout.css +373 -0
- package/src/styles/control.css +504 -0
- package/src/styles/data-display-layout.css +246 -0
- package/src/styles/density.css +43 -0
- package/src/styles/dialog-layout.css +84 -0
- package/src/styles/index.css +105 -0
- package/src/styles/layout.css +479 -0
- package/src/styles/shell-layout.css +604 -0
- package/src/styles/table-layout.css +109 -0
- package/src/test/__tests__/render-loop-guard.test.tsx +38 -0
- package/src/test/jest-dom.d.ts +4 -0
- package/src/test/render-loop-guard.tsx +50 -0
- package/src/test/render.tsx +29 -0
- package/src/test/theme-globals.test.ts +77 -0
- package/src/test/theme-globals.ts +134 -0
- package/src/test/theme-test-utils.tsx +67 -0
- package/src/theme/example.service.css +37 -0
- package/src/tokens/base.css +13 -0
- package/src/tokens/foundation.css +151 -0
- package/src/tokens/primitives/badge.css +13 -0
- package/src/tokens/primitives/card.css +29 -0
- package/src/tokens/primitives/control.css +55 -0
- package/src/tokens/primitives/feedback.css +17 -0
- package/src/tokens/primitives/layout.css +20 -0
- package/src/tokens/primitives/navigation.css +13 -0
- package/src/tokens/primitives/table.css +10 -0
- package/BRAND.md +0 -296
- package/CHANGELOG.md +0 -668
- package/config/eslint.js +0 -54
- package/config/prettier.cjs +0 -20
- package/config/tsconfig.base.json +0 -22
- package/config/vitest.base.ts +0 -26
- package/dist/MiniMonth-YAmPGEpC.d.ts +0 -143
- package/dist/Table.types-BbsxoIYE.d.ts +0 -352
- package/dist/color-DO0qqUAb.d.ts +0 -38
- package/dist/components/composites.d.ts +0 -963
- package/dist/components/composites.js +0 -7343
- package/dist/components/composites.js.map +0 -1
- package/dist/components/primitives.d.ts +0 -2744
- package/dist/components/primitives.js +0 -7356
- package/dist/components/primitives.js.map +0 -1
- package/dist/components/shell.d.ts +0 -182
- package/dist/components/shell.js +0 -774
- package/dist/components/shell.js.map +0 -1
- package/dist/hooks.d.ts +0 -100
- package/dist/hooks.js +0 -558
- package/dist/hooks.js.map +0 -1
- package/dist/i18n.d.ts +0 -61
- package/dist/i18n.js +0 -860
- package/dist/i18n.js.map +0 -1
- package/dist/index.d.ts +0 -33
- package/dist/index.js +0 -13062
- package/dist/index.js.map +0 -1
- package/dist/padding-DY0JV5Ja.d.ts +0 -16
- package/dist/preferences.d.ts +0 -132
- package/dist/preferences.js +0 -262
- package/dist/preferences.js.map +0 -1
- package/dist/props.d.ts +0 -86
- package/dist/props.js +0 -16
- package/dist/props.js.map +0 -1
- package/dist/size-CQwNvOWd.d.ts +0 -19
- package/dist/types-LTj-2bl-.d.ts +0 -30
- package/dist/useTableViews-D5NIAJ7h.d.ts +0 -154
- package/src/tokens/tailwind.css +0 -158
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** Barrel — all vocabulary prop types. */
|
|
2
|
+
|
|
3
|
+
export type {
|
|
4
|
+
ClassNameProp,
|
|
5
|
+
ChildrenProp,
|
|
6
|
+
IdProp,
|
|
7
|
+
OpenProp,
|
|
8
|
+
OnOpenChangeProp,
|
|
9
|
+
HandlerProp,
|
|
10
|
+
PendingProp,
|
|
11
|
+
RequiredProp,
|
|
12
|
+
DisabledProp,
|
|
13
|
+
LabelProp,
|
|
14
|
+
HelperProp,
|
|
15
|
+
ErrorProp,
|
|
16
|
+
PlaceholderProp,
|
|
17
|
+
NameProp,
|
|
18
|
+
ValueProp,
|
|
19
|
+
OnChangeProp,
|
|
20
|
+
OnClickProp,
|
|
21
|
+
AsChildProp,
|
|
22
|
+
} from "./shared.prop";
|
|
23
|
+
|
|
24
|
+
export type {
|
|
25
|
+
TitleProp,
|
|
26
|
+
SubtitleProp,
|
|
27
|
+
DescriptionProp,
|
|
28
|
+
ExtraProp,
|
|
29
|
+
FooterProp,
|
|
30
|
+
ActionProp,
|
|
31
|
+
IconProp,
|
|
32
|
+
ConfirmLabelProp,
|
|
33
|
+
CancelLabelProp,
|
|
34
|
+
ActionsProp,
|
|
35
|
+
} from "./content.prop";
|
|
36
|
+
|
|
37
|
+
export type {
|
|
38
|
+
PageDensityProp,
|
|
39
|
+
PageContainerVariantProp,
|
|
40
|
+
StackGapProp,
|
|
41
|
+
InlineGapProp,
|
|
42
|
+
TableDensityProp,
|
|
43
|
+
/** @deprecated Alias — use PageDensityProp */
|
|
44
|
+
DensityProp,
|
|
45
|
+
/** @deprecated Alias — use StackGapProp */
|
|
46
|
+
GapProp,
|
|
47
|
+
} from "./layout.prop";
|
|
48
|
+
|
|
49
|
+
export type {
|
|
50
|
+
ButtonVariantProp,
|
|
51
|
+
ButtonSizeProp,
|
|
52
|
+
ConfirmVariantProp,
|
|
53
|
+
StatusToneProp,
|
|
54
|
+
AlertVariantProp,
|
|
55
|
+
SortDirectionProp,
|
|
56
|
+
ColumnAlignProp,
|
|
57
|
+
SortStateProp,
|
|
58
|
+
} from "./interaction.prop";
|
|
59
|
+
|
|
60
|
+
export type { BreadcrumbItemProp, BreadcrumbProp, PageTitleProp } from "./navigation.prop";
|
|
61
|
+
|
|
62
|
+
export type {
|
|
63
|
+
GetRowIdProp,
|
|
64
|
+
OnRowClickProp,
|
|
65
|
+
ColumnDefProp,
|
|
66
|
+
SelectedIdsProp,
|
|
67
|
+
OnSelectChangeProp,
|
|
68
|
+
OnTableDensityChangeProp,
|
|
69
|
+
OnSortChangeProp,
|
|
70
|
+
OnSearchChangeProp,
|
|
71
|
+
OnClearFiltersProp,
|
|
72
|
+
HasActiveFiltersProp,
|
|
73
|
+
} from "./data.prop";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interaction & visual variant prop types.
|
|
3
|
+
* @see docs/PROPS-VOCABULARY.md#interaction-variants
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** Button visual style. */
|
|
7
|
+
export type ButtonVariantProp =
|
|
8
|
+
| "default"
|
|
9
|
+
| "destructive"
|
|
10
|
+
| "outline"
|
|
11
|
+
| "secondary"
|
|
12
|
+
| "ghost"
|
|
13
|
+
| "link";
|
|
14
|
+
|
|
15
|
+
/** Button size preset. */
|
|
16
|
+
export type ButtonSizeProp =
|
|
17
|
+
| "default"
|
|
18
|
+
| "xs"
|
|
19
|
+
| "sm"
|
|
20
|
+
| "lg"
|
|
21
|
+
| "icon"
|
|
22
|
+
| "icon-xs"
|
|
23
|
+
| "icon-sm"
|
|
24
|
+
| "icon-lg";
|
|
25
|
+
|
|
26
|
+
/** Dialog confirm button emphasis. */
|
|
27
|
+
export type ConfirmVariantProp = "default" | "destructive";
|
|
28
|
+
|
|
29
|
+
/** Badge / status pill color mapping key. */
|
|
30
|
+
export type StatusToneProp = "default" | "success" | "warning" | "destructive" | "muted";
|
|
31
|
+
|
|
32
|
+
/** Inline Alert banner — default maps to informational tone. */
|
|
33
|
+
export type AlertVariantProp = "default" | "destructive" | "warning" | "success";
|
|
34
|
+
|
|
35
|
+
/** Sort direction for table columns. */
|
|
36
|
+
export type SortDirectionProp = "asc" | "desc";
|
|
37
|
+
|
|
38
|
+
/** Table column text alignment. */
|
|
39
|
+
export type ColumnAlignProp = "left" | "center" | "right";
|
|
40
|
+
|
|
41
|
+
/** Active sort state on DataTable. */
|
|
42
|
+
export type SortStateProp = { key: string; direction: SortDirectionProp };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout & spacing prop types.
|
|
3
|
+
* @see docs/PROPS-VOCABULARY.md#layout--density
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** Page-level density — affects padding, control heights across PageContainer subtree. */
|
|
7
|
+
export type PageDensityProp = "compact" | "default" | "comfortable";
|
|
8
|
+
|
|
9
|
+
/** Page shell layout — orthogonal to PageDensityProp. */
|
|
10
|
+
export type PageContainerVariantProp = "default" | "narrow" | "flush" | "ghost";
|
|
11
|
+
|
|
12
|
+
/** Vertical stack gap between block-level children. */
|
|
13
|
+
export type StackGapProp = "xs" | "sm" | "md" | "lg" | "xl";
|
|
14
|
+
|
|
15
|
+
/** Horizontal inline gap between row items. */
|
|
16
|
+
export type InlineGapProp = "xs" | "sm" | "md" | "lg";
|
|
17
|
+
|
|
18
|
+
/** DataTable row density — NOT the same as PageDensityProp. */
|
|
19
|
+
export type TableDensityProp = "compact" | "comfortable";
|
|
20
|
+
|
|
21
|
+
/** @deprecated Alias — use PageDensityProp. Kept for lib/variants compat. */
|
|
22
|
+
export type DensityProp = PageDensityProp;
|
|
23
|
+
|
|
24
|
+
/** @deprecated Alias — use StackGapProp. */
|
|
25
|
+
export type GapProp = StackGapProp;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigation & wayfinding prop types.
|
|
3
|
+
* @see docs/PROPS-VOCABULARY.md#navigation
|
|
4
|
+
*/
|
|
5
|
+
import type { LabelProp } from "./shared.prop";
|
|
6
|
+
import type { TitleProp } from "./content.prop";
|
|
7
|
+
|
|
8
|
+
/** Single breadcrumb segment. */
|
|
9
|
+
export type BreadcrumbItemProp = {
|
|
10
|
+
label: LabelProp;
|
|
11
|
+
/** Router path — omit on current (last) segment. */
|
|
12
|
+
to?: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** Ordered breadcrumb trail above page title. */
|
|
16
|
+
export type BreadcrumbProp = BreadcrumbItemProp[];
|
|
17
|
+
|
|
18
|
+
/** Same as TitleProp — explicit name in page/navigation context. */
|
|
19
|
+
export type PageTitleProp = TitleProp;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared atomic prop types used across multiple components.
|
|
3
|
+
* @see docs/PROPS-VOCABULARY.md
|
|
4
|
+
*/
|
|
5
|
+
import type * as React from "react";
|
|
6
|
+
|
|
7
|
+
/** Extra CSS class names on a component root. */
|
|
8
|
+
export type ClassNameProp = string;
|
|
9
|
+
|
|
10
|
+
/** Child nodes slot. */
|
|
11
|
+
export type ChildrenProp = React.ReactNode;
|
|
12
|
+
|
|
13
|
+
/** Stable DOM / form identifier. */
|
|
14
|
+
export type IdProp = string;
|
|
15
|
+
|
|
16
|
+
/** Controlled open state for panels (Dialog, Sheet, Popover). */
|
|
17
|
+
export type OpenProp = boolean;
|
|
18
|
+
|
|
19
|
+
/** Callback when open state changes. */
|
|
20
|
+
export type OnOpenChangeProp = (open: boolean) => void;
|
|
21
|
+
|
|
22
|
+
/** Async or sync handler — no return value expected. */
|
|
23
|
+
export type HandlerProp = () => void | Promise<void>;
|
|
24
|
+
|
|
25
|
+
/** Loading / pending state — disables actions and shows spinners. */
|
|
26
|
+
export type PendingProp = boolean;
|
|
27
|
+
|
|
28
|
+
/** Field or control is required. */
|
|
29
|
+
export type RequiredProp = boolean;
|
|
30
|
+
|
|
31
|
+
/** Disable user interaction. */
|
|
32
|
+
export type DisabledProp = boolean;
|
|
33
|
+
|
|
34
|
+
/** Generic label text (filters, form fields, nav groups). */
|
|
35
|
+
export type LabelProp = React.ReactNode;
|
|
36
|
+
|
|
37
|
+
/** Helper / hint text below inputs. */
|
|
38
|
+
export type HelperProp = React.ReactNode;
|
|
39
|
+
|
|
40
|
+
/** Validation error message. */
|
|
41
|
+
export type ErrorProp = React.ReactNode;
|
|
42
|
+
|
|
43
|
+
/** Placeholder text for inputs. */
|
|
44
|
+
export type PlaceholderProp = string;
|
|
45
|
+
|
|
46
|
+
/** HTML input `name` attribute. */
|
|
47
|
+
export type NameProp = string;
|
|
48
|
+
|
|
49
|
+
/** HTML input `value` — string form. */
|
|
50
|
+
export type ValueProp = string;
|
|
51
|
+
|
|
52
|
+
/** Change handler for text inputs. */
|
|
53
|
+
export type OnChangeProp = React.ChangeEventHandler<HTMLInputElement>;
|
|
54
|
+
|
|
55
|
+
/** Click handler for buttons and interactive elements. */
|
|
56
|
+
export type OnClickProp = React.MouseEventHandler<HTMLButtonElement>;
|
|
57
|
+
|
|
58
|
+
/** Radix/shadcn `asChild` polymorphism — render as child element. */
|
|
59
|
+
export type AsChildProp = boolean;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ALERT — inset, gaps, dismiss offset; colors via data-variant + semantic tokens.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@layer components {
|
|
6
|
+
[data-slot="alert"] {
|
|
7
|
+
position: relative;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
gap: var(--space-alert-gap);
|
|
11
|
+
width: 100%;
|
|
12
|
+
border-radius: var(--radius-md);
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
padding: var(--space-alert-inset);
|
|
15
|
+
font-size: var(--font-size-sm);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[data-slot="alert"][data-variant="default"] {
|
|
19
|
+
border-color: hsl(var(--border));
|
|
20
|
+
background-color: hsl(var(--muted) / 0.4);
|
|
21
|
+
color: hsl(var(--foreground));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-slot="alert"][data-variant="destructive"] {
|
|
25
|
+
border-color: hsl(var(--destructive) / 0.3);
|
|
26
|
+
background-color: hsl(var(--destructive) / 0.05);
|
|
27
|
+
color: hsl(var(--foreground));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
[data-slot="alert"][data-variant="warning"] {
|
|
31
|
+
border-color: hsl(var(--warning) / 0.3);
|
|
32
|
+
background-color: hsl(var(--warning) / 0.05);
|
|
33
|
+
color: hsl(var(--foreground));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-slot="alert"][data-variant="success"] {
|
|
37
|
+
border-color: hsl(var(--success) / 0.3);
|
|
38
|
+
background-color: hsl(var(--success) / 0.05);
|
|
39
|
+
color: hsl(var(--foreground));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[data-slot="alert"][data-dismissible] {
|
|
43
|
+
padding-right: calc(var(--space-alert-inset) + var(--space-8));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[data-slot="alert-icon"] {
|
|
47
|
+
width: 1.25rem;
|
|
48
|
+
height: 1.25rem;
|
|
49
|
+
flex-shrink: 0;
|
|
50
|
+
margin-top: 0.125rem;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
[data-slot="alert-icon"][data-variant="default"] {
|
|
54
|
+
color: hsl(var(--foreground));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
[data-slot="alert-icon"][data-variant="destructive"] {
|
|
58
|
+
color: hsl(var(--destructive));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[data-slot="alert-icon"][data-variant="warning"] {
|
|
62
|
+
color: hsl(var(--warning));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[data-slot="alert-icon"][data-variant="success"] {
|
|
66
|
+
color: hsl(var(--success));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-slot="alert-body"] {
|
|
70
|
+
display: flex;
|
|
71
|
+
flex: 1;
|
|
72
|
+
min-width: 0;
|
|
73
|
+
flex-direction: column;
|
|
74
|
+
gap: var(--space-alert-inner-gap);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (min-width: 640px) {
|
|
78
|
+
[data-slot="alert-body"] {
|
|
79
|
+
flex-direction: row;
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
[data-slot="alert-title"] {
|
|
86
|
+
font-size: var(--font-size-sm);
|
|
87
|
+
font-weight: var(--font-weight-medium);
|
|
88
|
+
line-height: 1;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[data-slot="alert-title"][data-variant="destructive"] {
|
|
92
|
+
color: hsl(var(--destructive));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-slot="alert-title"][data-variant="warning"] {
|
|
96
|
+
color: hsl(var(--warning));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-slot="alert-title"][data-variant="success"] {
|
|
100
|
+
color: hsl(var(--success));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-slot="alert-description"] {
|
|
104
|
+
margin-top: var(--space-1);
|
|
105
|
+
font-size: var(--font-size-sm);
|
|
106
|
+
color: hsl(var(--muted-foreground));
|
|
107
|
+
overflow-wrap: break-word;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-slot="alert-actions"] {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-shrink: 0;
|
|
113
|
+
flex-wrap: wrap;
|
|
114
|
+
gap: var(--space-inline-sm);
|
|
115
|
+
width: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (min-width: 640px) {
|
|
119
|
+
[data-slot="alert-actions"] {
|
|
120
|
+
width: auto;
|
|
121
|
+
justify-content: flex-end;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[data-slot="alert-dismiss"] {
|
|
126
|
+
position: absolute;
|
|
127
|
+
top: var(--space-alert-dismiss-offset);
|
|
128
|
+
right: var(--space-alert-dismiss-offset);
|
|
129
|
+
border-radius: var(--radius-sm);
|
|
130
|
+
opacity: 0.7;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.ui-skeleton-block {
|
|
134
|
+
border-radius: var(--skeleton-radius);
|
|
135
|
+
background: hsl(var(--muted));
|
|
136
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.ui-skeleton-rows,
|
|
140
|
+
.ui-skeleton-detail-stack,
|
|
141
|
+
.ui-skeleton-card {
|
|
142
|
+
display: grid;
|
|
143
|
+
gap: var(--skeleton-row-gap);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.ui-skeleton-row,
|
|
147
|
+
.ui-skeleton-table-row {
|
|
148
|
+
display: flex;
|
|
149
|
+
align-items: center;
|
|
150
|
+
gap: var(--skeleton-cell-gap);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.ui-skeleton-table {
|
|
154
|
+
overflow: hidden;
|
|
155
|
+
border: 1px solid hsl(var(--border));
|
|
156
|
+
border-radius: var(--skeleton-radius);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.ui-skeleton-table-head {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: var(--skeleton-cell-gap);
|
|
163
|
+
padding-inline: var(--space-3);
|
|
164
|
+
background: hsl(var(--muted) / 0.5);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.ui-skeleton-table-body {
|
|
168
|
+
display: grid;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.ui-skeleton-table-row + .ui-skeleton-table-row {
|
|
172
|
+
border-top: 1px solid hsl(var(--border));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.ui-skeleton-detail {
|
|
176
|
+
max-width: 56rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.ui-skeleton-detail-box,
|
|
180
|
+
.ui-skeleton-card {
|
|
181
|
+
border: 1px solid hsl(var(--border));
|
|
182
|
+
border-radius: var(--skeleton-radius);
|
|
183
|
+
padding: var(--skeleton-card-inset);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
@keyframes pulse {
|
|
187
|
+
50% {
|
|
188
|
+
opacity: 0.5;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* STATUS BADGE — compact chip spacing + semantic tones (control-styles.ts maps tones).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
@layer components {
|
|
6
|
+
[data-slot="status-badge"] {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--space-badge-gap);
|
|
10
|
+
padding: var(--space-badge-y) var(--space-badge-x);
|
|
11
|
+
border-radius: var(--radius-md);
|
|
12
|
+
border-width: 1px;
|
|
13
|
+
font-size: var(--font-size-xs);
|
|
14
|
+
font-weight: var(--font-weight-medium);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
[data-slot="status-badge-icon"] {
|
|
18
|
+
width: 0.75rem;
|
|
19
|
+
height: 0.75rem;
|
|
20
|
+
flex-shrink: 0;
|
|
21
|
+
}
|
|
22
|
+
}
|