@godxjp/ui 5.0.2 → 6.0.1
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/dist/app/index.d.ts +140 -0
- package/dist/app/index.js +38 -0
- package/dist/app.prop-IobwLwaM.d.ts +90 -0
- package/dist/checkbox-NkFkqsQ8.d.ts +13 -0
- package/dist/chunk-2XW7J3EI.js +226 -0
- package/dist/chunk-3F2AKYRD.js +416 -0
- package/dist/chunk-3KPEZ5CF.js +37 -0
- package/dist/chunk-3UGU5TYP.js +89 -0
- package/dist/chunk-6RA3KSVK.js +588 -0
- package/dist/chunk-7NZFVD24.js +122 -0
- package/dist/chunk-7PWBC4BY.js +25 -0
- package/dist/chunk-7S7MYFXE.js +61 -0
- package/dist/chunk-7WRZG2IG.js +71 -0
- package/dist/chunk-B775Y6BE.js +1 -0
- package/dist/chunk-BHV2FUOA.js +111 -0
- package/dist/chunk-BI3HERR7.js +70 -0
- package/dist/chunk-BPSKQUL2.js +68 -0
- package/dist/chunk-CDWPQ5RP.js +187 -0
- package/dist/chunk-CP2LET6N.js +244 -0
- package/dist/chunk-CQBADMFG.js +20 -0
- package/dist/chunk-CRERCLIZ.js +33 -0
- package/dist/chunk-DU6ZYZRP.js +238 -0
- package/dist/chunk-DY5C44UP.js +55 -0
- package/dist/chunk-E4HJNQ62.js +117 -0
- package/dist/chunk-E76QIYSY.js +93 -0
- package/dist/chunk-F7PG4OEV.js +37 -0
- package/dist/chunk-GDSVW62T.js +171 -0
- package/dist/chunk-H2FHJOLU.js +178 -0
- package/dist/chunk-HJEBRCXL.js +55 -0
- package/dist/chunk-ICM6XBST.js +16 -0
- package/dist/chunk-IK7I3ABN.js +88 -0
- package/dist/chunk-L6J44O74.js +144 -0
- package/dist/chunk-LDSLS6HE.js +1 -0
- package/dist/chunk-LVNUHUEZ.js +191 -0
- package/dist/chunk-M64MVRLS.js +92 -0
- package/dist/chunk-NGQW3KEM.js +402 -0
- package/dist/chunk-NZ4FOC5N.js +559 -0
- package/dist/chunk-PIIRNAXA.js +26 -0
- package/dist/chunk-S66TJXJU.js +33 -0
- package/dist/chunk-SMLKNECP.js +133 -0
- package/dist/chunk-TAHBM3F2.js +66 -0
- package/dist/chunk-TO33OY4L.js +150 -0
- package/dist/chunk-TO7URV7U.js +51 -0
- package/dist/chunk-TOO5AEKL.js +81 -0
- package/dist/chunk-U3GHAOIJ.js +299 -0
- package/dist/chunk-U7N2A7A3.js +9 -0
- package/dist/chunk-UX634MYF.js +123 -0
- package/dist/chunk-V6UWJKZF.js +28 -0
- package/dist/chunk-VOHTRR5X.js +28 -0
- package/dist/chunk-WRFKVUPW.js +332 -0
- package/dist/chunk-WXW43RK5.js +24 -0
- package/dist/chunk-XG7XDYIM.js +60 -0
- package/dist/chunk-YFCQKO3B.js +842 -0
- package/dist/chunk-ZDWXGWLY.js +73 -0
- package/dist/chunk-ZLK5SPT6.js +11 -0
- package/dist/chunk-ZS6DTAM2.js +31 -0
- package/dist/chunk-ZT5UEUBO.js +1 -0
- package/dist/components/admin/index.d.ts +80 -0
- package/dist/components/admin/index.js +38 -0
- package/dist/components/data-display/badge.d.ts +12 -0
- package/dist/components/data-display/badge.js +3 -0
- package/dist/components/data-display/card.d.ts +87 -0
- package/dist/components/data-display/card.js +2 -0
- package/dist/components/data-display/index.d.ts +72 -0
- package/dist/components/data-display/index.js +89 -0
- package/dist/components/data-display/popover.d.ts +13 -0
- package/dist/components/data-display/popover.js +2 -0
- package/dist/components/data-display/scroll-area.d.ts +7 -0
- package/dist/components/data-display/scroll-area.js +2 -0
- package/dist/components/data-display/table.d.ts +10 -0
- package/dist/components/data-display/table.js +3 -0
- package/dist/components/data-entry/autocomplete.d.ts +16 -0
- package/dist/components/data-entry/autocomplete.js +8 -0
- package/dist/components/data-entry/calendar.d.ts +16 -0
- package/dist/components/data-entry/calendar.js +4 -0
- package/dist/components/data-entry/cascader.d.ts +32 -0
- package/dist/components/data-entry/cascader.js +13 -0
- package/dist/components/data-entry/checkbox.d.ts +13 -0
- package/dist/components/data-entry/checkbox.js +4 -0
- package/dist/components/data-entry/color-picker.d.ts +16 -0
- package/dist/components/data-entry/color-picker.js +6 -0
- package/dist/components/data-entry/command.d.ts +69 -0
- package/dist/components/data-entry/command.js +3 -0
- package/dist/components/data-entry/date-picker.d.ts +16 -0
- package/dist/components/data-entry/date-picker.js +8 -0
- package/dist/components/data-entry/date-range-picker.d.ts +16 -0
- package/dist/components/data-entry/date-range-picker.js +8 -0
- package/dist/components/data-entry/index.d.ts +53 -0
- package/dist/components/data-entry/index.js +152 -0
- package/dist/components/data-entry/input.d.ts +6 -0
- package/dist/components/data-entry/input.js +2 -0
- package/dist/components/data-entry/label.d.ts +8 -0
- package/dist/components/data-entry/label.js +2 -0
- package/dist/components/data-entry/radio.d.ts +24 -0
- package/dist/components/data-entry/radio.js +4 -0
- package/dist/components/data-entry/select.d.ts +18 -0
- package/dist/components/data-entry/select.js +3 -0
- package/dist/components/data-entry/slider.d.ts +16 -0
- package/dist/components/data-entry/slider.js +2 -0
- package/dist/components/data-entry/switch.d.ts +17 -0
- package/dist/components/data-entry/switch.js +2 -0
- package/dist/components/data-entry/textarea.d.ts +6 -0
- package/dist/components/data-entry/textarea.js +3 -0
- package/dist/components/data-entry/time-picker.d.ts +16 -0
- package/dist/components/data-entry/time-picker.js +7 -0
- package/dist/components/data-entry/transfer.d.ts +17 -0
- package/dist/components/data-entry/transfer.js +11 -0
- package/dist/components/data-entry/tree-select.d.ts +26 -0
- package/dist/components/data-entry/tree-select.js +13 -0
- package/dist/components/data-entry/upload.d.ts +42 -0
- package/dist/components/data-entry/upload.js +11 -0
- package/dist/components/feedback/alert.d.ts +60 -0
- package/dist/components/feedback/alert.js +7 -0
- package/dist/components/feedback/dialog.d.ts +64 -0
- package/dist/components/feedback/dialog.js +7 -0
- package/dist/components/feedback/index.d.ts +16 -0
- package/dist/components/feedback/index.js +14 -0
- package/dist/components/feedback/sheet.d.ts +24 -0
- package/dist/components/feedback/sheet.js +2 -0
- package/dist/components/feedback/sonner.d.ts +6 -0
- package/dist/components/feedback/sonner.js +1 -0
- package/dist/components/general/button.d.ts +20 -0
- package/dist/components/general/button.js +2 -0
- package/dist/components/general/index.d.ts +6 -0
- package/dist/components/general/index.js +2 -0
- package/dist/components/layout/index.d.ts +71 -0
- package/dist/components/layout/index.js +5 -0
- package/dist/components/navigation/dropdown-menu.d.ts +28 -0
- package/dist/components/navigation/dropdown-menu.js +2 -0
- package/dist/components/navigation/index.d.ts +32 -0
- package/dist/components/navigation/index.js +12 -0
- package/dist/components/navigation/pagination.d.ts +11 -0
- package/dist/components/navigation/pagination.js +7 -0
- package/dist/components/navigation/steps.d.ts +12 -0
- package/dist/components/navigation/steps.js +3 -0
- package/dist/components/navigation/tabs-items.d.ts +12 -0
- package/dist/components/navigation/tabs-items.js +3 -0
- package/dist/components/navigation/tabs.d.ts +12 -0
- package/dist/components/navigation/tabs.js +2 -0
- package/dist/components/query/index.d.ts +43 -0
- package/dist/components/query/index.js +8 -0
- package/dist/components/ui/index.d.ts +57 -0
- package/dist/components/ui/index.js +37 -0
- package/dist/content.prop-D1Dd3TAc.d.ts +31 -0
- package/dist/data-display.prop-DNTAzmDy.d.ts +58 -0
- package/dist/data-entry.prop-BEGA1lTq.d.ts +323 -0
- package/dist/data-table-D1u_rKLK.d.ts +83 -0
- package/dist/data.prop-BVvfKC_g.d.ts +41 -0
- package/dist/feedback.prop-BmxUlpAW.d.ts +64 -0
- package/dist/filter-bar-B7OGFO9S.d.ts +10 -0
- package/dist/form/index.d.ts +21 -0
- package/dist/form/index.js +4 -0
- package/dist/form.prop-BHgpuFFm.d.ts +41 -0
- package/dist/format-date-ByyZoqI5.d.ts +51 -0
- package/dist/general.prop-D7brMPNL.d.ts +16 -0
- package/dist/i18n/index.d.ts +217 -0
- package/dist/i18n/index.js +2 -0
- package/dist/index.d.ts +46 -26
- package/dist/index.js +39 -13062
- package/dist/inline-C5u6ptJV.d.ts +10 -0
- package/dist/interaction.prop-Cdn7wOtq.d.ts +25 -0
- package/dist/layout.prop-4TCNvyQZ.d.ts +20 -0
- package/dist/layout.prop-C795F0qg.d.ts +112 -0
- package/dist/lib/datetime/index.d.ts +31 -0
- package/dist/lib/datetime/index.js +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +1 -0
- package/dist/navigation.prop-DpZqcXey.d.ts +78 -0
- package/dist/navigation.prop-DxBiClEH.d.ts +20 -0
- package/dist/props/components/index.d.ts +27 -0
- package/dist/props/components/index.js +1 -0
- package/dist/props/index.d.ts +28 -0
- package/dist/props/index.js +3 -0
- package/dist/props/registry.d.ts +649 -0
- package/dist/props/registry.js +1 -0
- package/dist/props/vocabulary/index.d.ts +7 -0
- package/dist/props/vocabulary/index.js +1 -0
- package/dist/query.prop-hIPrk2zI.d.ts +71 -0
- package/dist/search-input-uP01rY1L.d.ts +22 -0
- package/dist/shared.prop-BNRJc9K0.d.ts +45 -0
- package/dist/styles/alert-layout.css +191 -0
- package/dist/styles/badge-layout.css +22 -0
- package/dist/styles/card-layout.css +373 -0
- package/dist/styles/control.css +504 -0
- package/dist/styles/data-display-layout.css +246 -0
- package/dist/styles/density.css +43 -0
- package/dist/styles/dialog-layout.css +84 -0
- package/dist/styles/index.css +105 -0
- package/dist/styles/layout.css +479 -0
- package/dist/styles/shell-layout.css +604 -0
- package/dist/styles/table-layout.css +109 -0
- package/dist/theme/example.service.css +37 -0
- package/dist/tokens/base.css +13 -0
- package/dist/tokens/foundation.css +151 -0
- package/dist/tokens/primitives/badge.css +13 -0
- package/dist/tokens/primitives/card.css +29 -0
- package/dist/tokens/primitives/control.css +55 -0
- package/dist/tokens/primitives/feedback.css +17 -0
- package/dist/tokens/primitives/layout.css +20 -0
- package/dist/tokens/primitives/navigation.css +13 -0
- package/dist/tokens/primitives/table.css +10 -0
- package/dist/types-mvzYGrma.d.ts +37 -0
- package/dist/use-toast-Dol5bdY3.d.ts +34 -0
- package/package.json +279 -117
- package/scripts/ui-audit.mjs +179 -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.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,37 @@
|
|
|
1
|
+
/* Service theme — the ONLY file apps may use to customize design tokens.
|
|
2
|
+
* Copy to: apps/<your-app>/src/theme.css
|
|
3
|
+
* Import this file once in main.tsx (instead of @godxjp/ui/styles directly). */
|
|
4
|
+
|
|
5
|
+
@import "@godxjp/ui/styles";
|
|
6
|
+
|
|
7
|
+
/* Override tokens below. Do NOT add component styles or Tailwind utilities here. */
|
|
8
|
+
:root {
|
|
9
|
+
/* Brand — pair primary with a focus ring and tinted accent: */
|
|
10
|
+
/* --primary: 211 73% 15%; */
|
|
11
|
+
/* --primary-foreground: 0 0% 100%; */
|
|
12
|
+
/* --ring: 24 99% 46%; */
|
|
13
|
+
/* --accent: 24 99% 95%; */
|
|
14
|
+
/* --accent-foreground: 24 99% 28%; */
|
|
15
|
+
|
|
16
|
+
/* Semantic status (optional — defaults in base.css): */
|
|
17
|
+
/* --success: 146 40% 58%; */
|
|
18
|
+
/* --warning: 44 100% 49%; */
|
|
19
|
+
/* --info: 223 42% 50%; */
|
|
20
|
+
/* --attention: 24 99% 46%; */
|
|
21
|
+
|
|
22
|
+
/* Tracking-code identity (optional — do not reuse for status): */
|
|
23
|
+
/* --tracking-internal: 211 73% 15%; */
|
|
24
|
+
/* --tracking-seller: 44 5% 42%; */
|
|
25
|
+
/* --tracking-yamato: 24 99% 46%; */
|
|
26
|
+
|
|
27
|
+
/* Layout density (optional): */
|
|
28
|
+
/* --space-page-x: var(--space-8); */
|
|
29
|
+
|
|
30
|
+
/* Primitive component tokens — override tokens only, no selector CSS: */
|
|
31
|
+
/* --card-space-inset: var(--space-section-active); */
|
|
32
|
+
/* --card-space-header-y: var(--space-stack-sm); */
|
|
33
|
+
/* --card-space-body-y: var(--space-section-active); */
|
|
34
|
+
/* --card-space-footer-y: var(--space-stack-sm); */
|
|
35
|
+
/* --card-title-font-size: var(--font-size-base); */
|
|
36
|
+
/* --card-header-background-alpha: 0.55; */
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* @godxjp/ui — token manifest.
|
|
2
|
+
* Services MUST NOT edit package token files directly.
|
|
3
|
+
* App-specific overrides live in app theme.css after importing @godxjp/ui/styles.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
@import "./foundation.css";
|
|
7
|
+
@import "./primitives/layout.css";
|
|
8
|
+
@import "./primitives/control.css";
|
|
9
|
+
@import "./primitives/card.css";
|
|
10
|
+
@import "./primitives/table.css";
|
|
11
|
+
@import "./primitives/feedback.css";
|
|
12
|
+
@import "./primitives/badge.css";
|
|
13
|
+
@import "./primitives/navigation.css";
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/* Foundation tokens: color, typography, raw spacing, ratio, radius, shadow. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* Color system (HSL components) — dxs-kintai: warm hue-60 neutral spine,
|
|
5
|
+
* SmartHR blue primary, 和色/wa-iro semantics. */
|
|
6
|
+
--background: 60 33% 99%; /* #fdfdfb warm off-white */
|
|
7
|
+
--foreground: 48 8% 13%; /* #23221e SmartHR TEXT_BLACK */
|
|
8
|
+
--card: 60 33% 99%;
|
|
9
|
+
--card-foreground: 48 8% 13%;
|
|
10
|
+
--popover: 60 33% 99%;
|
|
11
|
+
--popover-foreground: 48 8% 13%;
|
|
12
|
+
--primary: 204 100% 39%; /* SmartHR MAIN #0077c7 */
|
|
13
|
+
--primary-foreground: 60 33% 99%;
|
|
14
|
+
--secondary: 45 15% 95%; /* #f4f3f0 */
|
|
15
|
+
--secondary-foreground: 48 8% 13%;
|
|
16
|
+
--muted: 45 15% 95%;
|
|
17
|
+
--muted-foreground: 44 5% 42%; /* #706d65 SmartHR TEXT_GREY */
|
|
18
|
+
--accent: 40 13% 91%; /* #ebe9e5 */
|
|
19
|
+
--accent-foreground: 48 8% 13%;
|
|
20
|
+
--destructive: 357 64% 44%; /* 茜 #b7282e */
|
|
21
|
+
--destructive-foreground: 60 33% 99%;
|
|
22
|
+
--border: 30 7% 83%; /* #d6d3d0 SmartHR BORDER */
|
|
23
|
+
--input: 30 7% 83%;
|
|
24
|
+
--ring: 204 100% 39%;
|
|
25
|
+
--success: 146 40% 58%; /* 若竹 #68be8d */
|
|
26
|
+
--success-foreground: 60 33% 99%;
|
|
27
|
+
--warning: 44 100% 49%; /* 山吹 #f8b500 */
|
|
28
|
+
--warning-foreground: 48 8% 13%;
|
|
29
|
+
--info: 221 40% 50%; /* 群青 #4c6cb3 */
|
|
30
|
+
--info-foreground: 60 33% 99%;
|
|
31
|
+
--attention: 25 99% 46%; /* 朱 #eb6101 */
|
|
32
|
+
--attention-foreground: 60 33% 99%;
|
|
33
|
+
--tracking-internal: 204 100% 39%;
|
|
34
|
+
--tracking-seller: 44 5% 42%;
|
|
35
|
+
--tracking-yamato: 25 99% 46%;
|
|
36
|
+
|
|
37
|
+
/* 和色 (wa-iro) — traditional Japanese accent palette for charts, tags,
|
|
38
|
+
* decoration. Decorative hex (NOT semantic): never remap a wa-iro to a
|
|
39
|
+
* semantic role beyond the five canonical mappings used above. */
|
|
40
|
+
--wa-ai: #165e83; /* 藍 indigo */
|
|
41
|
+
--wa-gunjo: #4c6cb3; /* 群青 ultramarine */
|
|
42
|
+
--wa-ruri: #1e50a2; /* 瑠璃 lapis */
|
|
43
|
+
--wa-kon: #223a70; /* 紺 navy */
|
|
44
|
+
--wa-wakatake: #68be8d; /* 若竹 young bamboo */
|
|
45
|
+
--wa-moegi: #006e54; /* 萌葱 spring green */
|
|
46
|
+
--wa-yamabuki: #f8b500; /* 山吹 mountain yellow */
|
|
47
|
+
--wa-shu: #eb6101; /* 朱 vermilion */
|
|
48
|
+
--wa-akane: #b7282e; /* 茜 madder */
|
|
49
|
+
--wa-enji: #b94047; /* 臙脂 cochineal */
|
|
50
|
+
--wa-sakura: #fef4f4; /* 桜 cherry (soft bg) */
|
|
51
|
+
--wa-sumi: #595857; /* 墨 warm ink */
|
|
52
|
+
--wa-nezu: #949495; /* 鼠 mouse-grey */
|
|
53
|
+
|
|
54
|
+
/* Neutral + blue ramps (data viz, fine UI shading). */
|
|
55
|
+
--gray-50: #f9fafb;
|
|
56
|
+
--gray-100: #f3f4f6;
|
|
57
|
+
--gray-200: #e5e7eb;
|
|
58
|
+
--gray-300: #d1d5db;
|
|
59
|
+
--gray-400: #9ca3af;
|
|
60
|
+
--gray-500: #6b7280;
|
|
61
|
+
--gray-600: #4b5563;
|
|
62
|
+
--gray-700: #374151;
|
|
63
|
+
--gray-800: #1f2937;
|
|
64
|
+
--gray-900: #111827;
|
|
65
|
+
--blue-50: #eff6ff;
|
|
66
|
+
--blue-100: #dbeafe;
|
|
67
|
+
--blue-500: #3b82f6;
|
|
68
|
+
--blue-600: #2563eb;
|
|
69
|
+
--blue-700: #1d4ed8;
|
|
70
|
+
|
|
71
|
+
/* Shape and elevation */
|
|
72
|
+
--radius: 0.375rem;
|
|
73
|
+
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
|
|
74
|
+
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
|
|
75
|
+
--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
|
|
76
|
+
|
|
77
|
+
/* Typography scale — M PLUS 2 (JIS L1+L2 kanji, Vietnamese subset), one notch
|
|
78
|
+
* larger than the JP-dense base for comfortable reading (body 14px). */
|
|
79
|
+
--font-family-sans:
|
|
80
|
+
"M PLUS 2", "Be Vietnam Pro", "Hiragino Sans", "Noto Sans JP", -apple-system,
|
|
81
|
+
BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
|
|
82
|
+
--font-family-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
83
|
+
--font-size-xs: 0.8125rem; /* 13px */
|
|
84
|
+
--font-size-sm: 0.875rem; /* 14px — body */
|
|
85
|
+
--font-size-base: 0.9375rem; /* 15px */
|
|
86
|
+
--font-size-lg: 1.1875rem; /* 19px */
|
|
87
|
+
--font-size-xl: 1.375rem; /* 22px */
|
|
88
|
+
--font-size-2xl: 1.625rem; /* 26px */
|
|
89
|
+
--font-weight-normal: 400;
|
|
90
|
+
--font-weight-medium: 500;
|
|
91
|
+
--font-weight-semibold: 600;
|
|
92
|
+
--line-height-tight: 1.25;
|
|
93
|
+
--line-height-normal: 1.5;
|
|
94
|
+
--line-height-body: 1.7;
|
|
95
|
+
--letter-spacing-tight: 0;
|
|
96
|
+
|
|
97
|
+
/* Raw spacing scale */
|
|
98
|
+
--space-0: 0;
|
|
99
|
+
--space-1: 0.25rem;
|
|
100
|
+
--space-2: 0.5rem;
|
|
101
|
+
--space-3: 0.75rem;
|
|
102
|
+
--space-4: 1rem;
|
|
103
|
+
--space-5: 1.25rem;
|
|
104
|
+
--space-6: 1.5rem;
|
|
105
|
+
--space-8: 2rem;
|
|
106
|
+
--space-10: 2.5rem;
|
|
107
|
+
--space-12: 3rem;
|
|
108
|
+
|
|
109
|
+
/* Golden ratio scale */
|
|
110
|
+
--ratio-phi: 1.6180339887;
|
|
111
|
+
--phi-unit: var(--space-4);
|
|
112
|
+
--phi-n2: calc(var(--phi-unit) / var(--ratio-phi) / var(--ratio-phi));
|
|
113
|
+
--phi-n1: calc(var(--phi-unit) / var(--ratio-phi));
|
|
114
|
+
--phi-0: var(--phi-unit);
|
|
115
|
+
--phi-p1: calc(var(--phi-unit) * var(--ratio-phi));
|
|
116
|
+
--phi-p2: calc(var(--phi-p1) * var(--ratio-phi));
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.dark {
|
|
120
|
+
/* Warm-tinted dark spine — keeps the hue-60 character at low lightness. */
|
|
121
|
+
--background: 48 9% 9%;
|
|
122
|
+
--foreground: 60 20% 96%;
|
|
123
|
+
--card: 48 8% 12%;
|
|
124
|
+
--card-foreground: 60 20% 96%;
|
|
125
|
+
--popover: 48 8% 12%;
|
|
126
|
+
--popover-foreground: 60 20% 96%;
|
|
127
|
+
--primary: 204 90% 60%; /* SmartHR blue lifted for dark contrast */
|
|
128
|
+
--primary-foreground: 48 9% 9%;
|
|
129
|
+
--secondary: 45 6% 18%;
|
|
130
|
+
--secondary-foreground: 60 20% 96%;
|
|
131
|
+
--muted: 45 6% 18%;
|
|
132
|
+
--muted-foreground: 44 6% 64%;
|
|
133
|
+
--accent: 45 7% 22%;
|
|
134
|
+
--accent-foreground: 60 20% 96%;
|
|
135
|
+
--destructive: 357 55% 52%;
|
|
136
|
+
--destructive-foreground: 60 20% 96%;
|
|
137
|
+
--border: 45 6% 22%;
|
|
138
|
+
--input: 45 6% 22%;
|
|
139
|
+
--ring: 204 90% 60%;
|
|
140
|
+
--success: 146 45% 55%;
|
|
141
|
+
--success-foreground: 48 9% 9%;
|
|
142
|
+
--warning: 44 95% 55%;
|
|
143
|
+
--warning-foreground: 48 9% 9%;
|
|
144
|
+
--info: 221 55% 62%;
|
|
145
|
+
--info-foreground: 48 9% 9%;
|
|
146
|
+
--attention: 25 95% 56%;
|
|
147
|
+
--attention-foreground: 48 9% 9%;
|
|
148
|
+
--tracking-internal: 204 90% 60%;
|
|
149
|
+
--tracking-seller: 44 6% 64%;
|
|
150
|
+
--tracking-yamato: 25 95% 56%;
|
|
151
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* Badge primitive tokens. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--space-badge-gap: var(--space-inline-xs);
|
|
5
|
+
--space-badge-x: var(--space-2);
|
|
6
|
+
--space-badge-y: var(--space-1);
|
|
7
|
+
--code-badge-height: 1.75rem;
|
|
8
|
+
--code-badge-gap: var(--space-inline-sm);
|
|
9
|
+
--code-badge-padding-x: var(--space-2);
|
|
10
|
+
--code-badge-bg-alpha: 0.055;
|
|
11
|
+
--code-badge-border-alpha: 0.28;
|
|
12
|
+
--code-badge-separator-alpha: 0.22;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* Card primitive tokens: card chrome derives from foundation + layout primitives. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--card-space-inset: var(--space-section-active);
|
|
5
|
+
--card-space-header-y: var(--space-stack-sm);
|
|
6
|
+
--card-space-body-y: var(--space-section-active);
|
|
7
|
+
--card-space-footer-y: var(--space-stack-sm);
|
|
8
|
+
--card-space-gap: var(--space-stack-xs);
|
|
9
|
+
--card-title-font-size: var(--font-size-base);
|
|
10
|
+
--card-title-line-height: var(--line-height-tight);
|
|
11
|
+
--card-title-font-weight: var(--font-weight-semibold);
|
|
12
|
+
--card-description-font-size: var(--font-size-sm);
|
|
13
|
+
--card-description-line-height: var(--line-height-normal);
|
|
14
|
+
--card-background: var(--card);
|
|
15
|
+
--card-foreground-token: var(--card-foreground);
|
|
16
|
+
--card-border-token: var(--border);
|
|
17
|
+
--card-header-background: var(--muted);
|
|
18
|
+
--card-header-background-alpha: 0.55;
|
|
19
|
+
--card-radius: var(--radius);
|
|
20
|
+
--card-stat-label-font-size: var(--font-size-xs);
|
|
21
|
+
--card-stat-label-font-weight: var(--font-weight-medium);
|
|
22
|
+
--card-stat-label-letter-spacing: 0.04em;
|
|
23
|
+
--card-stat-value-font-size: 1.625rem;
|
|
24
|
+
--card-stat-value-line-height: 1.1;
|
|
25
|
+
--card-stat-value-font-weight: var(--font-weight-semibold);
|
|
26
|
+
--card-stat-hint-font-size: var(--font-size-xs);
|
|
27
|
+
--card-stat-gap: var(--space-stack-xs);
|
|
28
|
+
--card-stat-icon-size: 2.25rem;
|
|
29
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/* Control primitive tokens: heights, horizontal padding, adjacent control sizes. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--control-height-compact: 1.75rem;
|
|
5
|
+
--control-height-default: 2rem;
|
|
6
|
+
--control-height-comfortable: 2.75rem;
|
|
7
|
+
--control-padding-x-compact: var(--space-2);
|
|
8
|
+
--control-padding-x-default: var(--space-3);
|
|
9
|
+
--control-padding-x-comfortable: var(--space-4);
|
|
10
|
+
|
|
11
|
+
--control-height: var(--control-height-default);
|
|
12
|
+
/* Adjacent control sizes, derived from the active --control-height.
|
|
13
|
+
* Default/compact use a 4px/8px step; density overrides comfortable
|
|
14
|
+
* (which steps 44→36→32 per the design's spacing-density spec). */
|
|
15
|
+
--control-height-sm: calc(var(--control-height) - 0.25rem);
|
|
16
|
+
--control-height-lg: calc(var(--control-height) + 0.25rem);
|
|
17
|
+
--control-height-xs: calc(var(--control-height) - 0.5rem);
|
|
18
|
+
--control-padding-x: var(--control-padding-x-default);
|
|
19
|
+
--control-gap: var(--space-inline-sm);
|
|
20
|
+
--control-gap-sm: var(--space-inline-xs);
|
|
21
|
+
--control-radius: var(--radius);
|
|
22
|
+
--control-icon-size: 1rem;
|
|
23
|
+
--control-icon-size-sm: 0.875rem;
|
|
24
|
+
--control-focus-ring-width: 2px;
|
|
25
|
+
|
|
26
|
+
--checkbox-size: 1rem;
|
|
27
|
+
--choice-gap: var(--space-inline-sm);
|
|
28
|
+
--choice-group-gap-x: var(--space-6);
|
|
29
|
+
--choice-group-gap-y: var(--space-3);
|
|
30
|
+
--choice-description-gap: 0.125rem;
|
|
31
|
+
--choice-control-offset: 0.125rem;
|
|
32
|
+
|
|
33
|
+
--switch-width: 2.25rem;
|
|
34
|
+
--switch-height: 1.25rem;
|
|
35
|
+
--switch-thumb-size: 1rem;
|
|
36
|
+
--switch-thumb-translate: 1rem;
|
|
37
|
+
|
|
38
|
+
--slider-track-height: 0.375rem;
|
|
39
|
+
--slider-thumb-size: 1rem;
|
|
40
|
+
|
|
41
|
+
--color-picker-input-width: 6.5rem;
|
|
42
|
+
|
|
43
|
+
--command-list-max-height: min(300px, 50vh);
|
|
44
|
+
--command-input-padding-x: var(--space-3);
|
|
45
|
+
--command-group-padding: var(--space-1);
|
|
46
|
+
--command-item-padding-y: var(--space-2);
|
|
47
|
+
--command-item-padding-x: var(--space-2);
|
|
48
|
+
--search-input-edge-inset: var(--space-3);
|
|
49
|
+
--search-input-start-padding: calc(
|
|
50
|
+
var(--search-input-edge-inset) + var(--control-icon-size) + var(--control-gap)
|
|
51
|
+
);
|
|
52
|
+
--search-input-end-padding: calc(
|
|
53
|
+
var(--search-input-edge-inset) + var(--control-icon-size) + var(--control-gap)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* Feedback primitive tokens: dialog, alert, empty state. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--space-dialog-inset: var(--space-5);
|
|
5
|
+
--space-dialog-gap: var(--space-stack-md);
|
|
6
|
+
--space-dialog-close-offset: var(--space-4);
|
|
7
|
+
--space-alert-inset: var(--space-section-active);
|
|
8
|
+
--space-alert-gap: var(--space-inline-md);
|
|
9
|
+
--space-alert-inner-gap: var(--space-stack-sm);
|
|
10
|
+
--space-alert-dismiss-offset: var(--space-3);
|
|
11
|
+
--space-empty-state-y: var(--space-10);
|
|
12
|
+
--space-empty-state-x: var(--space-6);
|
|
13
|
+
--skeleton-row-gap: var(--space-stack-sm);
|
|
14
|
+
--skeleton-cell-gap: var(--space-inline-lg);
|
|
15
|
+
--skeleton-card-inset: var(--space-section-active);
|
|
16
|
+
--skeleton-radius: var(--radius);
|
|
17
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* Layout primitive tokens: page, section, stack, inline. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--space-page-x: var(--phi-0);
|
|
5
|
+
--space-page-y: var(--phi-0);
|
|
6
|
+
--space-section: var(--phi-0);
|
|
7
|
+
--space-stack-xs: var(--space-1);
|
|
8
|
+
--space-stack-sm: var(--space-2);
|
|
9
|
+
--space-stack-md: var(--phi-0);
|
|
10
|
+
--space-stack-lg: var(--phi-p1);
|
|
11
|
+
--space-stack-xl: var(--phi-p2);
|
|
12
|
+
--space-inline-xs: var(--space-1);
|
|
13
|
+
--space-inline-sm: var(--space-2);
|
|
14
|
+
--space-inline-md: var(--phi-n1);
|
|
15
|
+
--space-inline-lg: var(--phi-0);
|
|
16
|
+
|
|
17
|
+
--space-page-active-x: var(--space-page-x);
|
|
18
|
+
--space-page-active-y: var(--space-page-y);
|
|
19
|
+
--space-section-active: var(--space-section);
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/* Navigation primitive tokens: pagination, filters, compact pickers. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--pagination-gap: var(--space-inline-sm);
|
|
5
|
+
--pagination-item-gap: var(--space-inline-xs);
|
|
6
|
+
--pagination-size-width: 5.5rem;
|
|
7
|
+
--pagination-total-font-size: var(--font-size-sm);
|
|
8
|
+
--filter-bar-gap: var(--space-3);
|
|
9
|
+
--filter-bar-padding-y: var(--space-2);
|
|
10
|
+
--filter-label-font-size: var(--font-size-xs);
|
|
11
|
+
--filter-picker-width-sm: 11rem;
|
|
12
|
+
--filter-picker-width-md: 14rem;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* Table primitive tokens: row height, cell padding. */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--table-row-height-compact: 1.75rem;
|
|
5
|
+
--table-row-height-default: 2rem;
|
|
6
|
+
--table-row-height-comfortable: 2.75rem;
|
|
7
|
+
--table-row-height: var(--table-row-height-default);
|
|
8
|
+
--table-cell-padding-y: var(--space-2);
|
|
9
|
+
--space-table-cell-x: var(--control-padding-x);
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/** Clock display — sent as `x-time-format` to backend. */
|
|
2
|
+
type AppTimeFormat = "24h" | "12h";
|
|
3
|
+
declare const APP_TIME_FORMATS: readonly ["24h", "12h"];
|
|
4
|
+
declare const APP_REQUEST_HEADER_TIME_FORMAT: "x-time-format";
|
|
5
|
+
/** date-fns pattern for time-only display. */
|
|
6
|
+
declare function getTimePattern(timeFormat: AppTimeFormat): string;
|
|
7
|
+
declare function isAppTimeFormat(value: string | null | undefined): value is AppTimeFormat;
|
|
8
|
+
|
|
9
|
+
/** Date-only display preset — sent as `x-date-format` to backend. */
|
|
10
|
+
|
|
11
|
+
type AppDateFormat = "iso" | "dmy" | "mdy";
|
|
12
|
+
declare const APP_DATE_FORMATS: readonly ["iso", "dmy", "mdy"];
|
|
13
|
+
declare const APP_REQUEST_HEADER_DATE_FORMAT: "x-date-format";
|
|
14
|
+
/** date-fns pattern for date-only display. */
|
|
15
|
+
declare function getDatePattern(dateFormat: AppDateFormat): string;
|
|
16
|
+
/** date-fns pattern for date + time (table cells). */
|
|
17
|
+
declare function getDateTimePattern(timeFormat: AppTimeFormat, dateFormat: AppDateFormat): string;
|
|
18
|
+
declare function isAppDateFormat(value: string | null | undefined): value is AppDateFormat;
|
|
19
|
+
|
|
20
|
+
/** Supported UI locales — sent as `x-locale` to backend. */
|
|
21
|
+
type AppLocale = "vi" | "en" | "ja";
|
|
22
|
+
/** IANA timezone identifier — sent as `x-timezone` to backend. */
|
|
23
|
+
type AppTimezone = string;
|
|
24
|
+
/** How to resolve the initial timezone when nothing is stored. */
|
|
25
|
+
type AppTimezoneDefault = "browser" | "system" | (AppTimezone & {});
|
|
26
|
+
|
|
27
|
+
declare const APP_LOCALES: readonly ["vi", "en", "ja"];
|
|
28
|
+
declare const APP_REQUEST_HEADER_LOCALE: "x-locale";
|
|
29
|
+
declare const APP_REQUEST_HEADER_TIMEZONE: "x-timezone";
|
|
30
|
+
type AppRequestHeaders = {
|
|
31
|
+
"x-locale": AppLocale;
|
|
32
|
+
"x-timezone": AppTimezone;
|
|
33
|
+
"x-time-format": AppTimeFormat;
|
|
34
|
+
"x-date-format": AppDateFormat;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { APP_DATE_FORMATS as A, APP_LOCALES as a, APP_REQUEST_HEADER_DATE_FORMAT as b, APP_REQUEST_HEADER_LOCALE as c, APP_REQUEST_HEADER_TIMEZONE as d, APP_REQUEST_HEADER_TIME_FORMAT as e, APP_TIME_FORMATS as f, type AppDateFormat as g, type AppLocale as h, type AppRequestHeaders as i, type AppTimeFormat as j, type AppTimezone as k, type AppTimezoneDefault as l, getDatePattern as m, getDateTimePattern as n, getTimePattern as o, isAppDateFormat as p, isAppTimeFormat as q };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ExternalToast, toast as toast$1 } from 'sonner';
|
|
4
|
+
|
|
5
|
+
interface SkeletonRowsProps {
|
|
6
|
+
rows?: number;
|
|
7
|
+
columns?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Skeleton for a flat list of rows (use inside a Card or section). */
|
|
11
|
+
declare function SkeletonRows({ rows, columns, className }: SkeletonRowsProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
/** Skeleton matching the DataTable layout — header row + N body rows. */
|
|
13
|
+
declare function SkeletonTable({ rows, columns }: SkeletonRowsProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
/** Skeleton matching a Card detail layout — title + 6 metadata rows. */
|
|
15
|
+
declare function SkeletonDetail(): react_jsx_runtime.JSX.Element;
|
|
16
|
+
/** Skeleton matching a stat card / dashboard tile. */
|
|
17
|
+
declare function SkeletonCard(): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
type LegacyToastOptions = ExternalToast & {
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
description?: React.ReactNode;
|
|
22
|
+
variant?: "default" | "destructive" | "success";
|
|
23
|
+
};
|
|
24
|
+
type ToastFn = typeof toast$1 & ((options: LegacyToastOptions) => ReturnType<typeof toast$1>);
|
|
25
|
+
/** Sonner toast + legacy `{ title, variant }` object form. */
|
|
26
|
+
declare const toast: ToastFn;
|
|
27
|
+
/** Legacy hook — prefer `toast` import directly; kept for existing admin pages. */
|
|
28
|
+
declare function useToast(): {
|
|
29
|
+
toast: (options: LegacyToastOptions) => string | number;
|
|
30
|
+
dismiss: (id?: number | string) => string | number;
|
|
31
|
+
toasts: readonly [];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { type LegacyToastOptions as L, SkeletonCard as S, SkeletonDetail as a, SkeletonRows as b, SkeletonTable as c, toast as t, useToast as u };
|