@dinofront/design_system 1.2.2 → 1.3.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.
Files changed (33) hide show
  1. package/dist/components/Avatar/Avatar.types.d.ts +26 -1
  2. package/dist/components/Checkbox/Checkbox.types.d.ts +4 -0
  3. package/dist/components/DatePicker/DatePicker.types.d.ts +15 -1
  4. package/dist/components/Divider/index.d.ts +1 -1
  5. package/dist/components/DropdownMenu/DropdownMenu.types.d.ts +7 -2
  6. package/dist/components/FormContainer/FormContainer.types.d.ts +3 -1
  7. package/dist/components/MultiSelect/MultiSelect.types.d.ts +10 -2
  8. package/dist/components/Radio/Radio.types.d.ts +10 -0
  9. package/dist/components/Select/Select.types.d.ts +11 -0
  10. package/dist/components/StepIndicator/StepIndicator.types.d.ts +4 -4
  11. package/dist/components/TableV2/TableV2.d.ts +9 -0
  12. package/dist/components/TableV2/TableV2.types.d.ts +99 -0
  13. package/dist/components/TableV2/TableV2.utils.d.ts +14 -0
  14. package/dist/components/TableV2/TableV2ColumnVisibility.d.ts +6 -0
  15. package/dist/components/TableV2/TableV2Filter.d.ts +10 -0
  16. package/dist/components/TableV2/TableV2Pagination.d.ts +7 -0
  17. package/dist/components/TableV2/TableV2RowActions.d.ts +7 -0
  18. package/dist/components/TableV2/TableV2Skeleton.d.ts +6 -0
  19. package/dist/components/TableV2/TableV2Toolbar.d.ts +13 -0
  20. package/dist/components/TableV2/index.d.ts +9 -0
  21. package/dist/components/TableV2/useTableV2ColumnDnd.d.ts +24 -0
  22. package/dist/components/Upload/Upload.d.ts +6 -1
  23. package/dist/components/Upload/Upload.types.d.ts +14 -2
  24. package/dist/components/Upload/index.d.ts +2 -2
  25. package/dist/hooks/index.d.ts +1 -0
  26. package/dist/icons.js.map +1 -1
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +2289 -1498
  29. package/dist/index.js.map +1 -1
  30. package/dist/lib/FormContext.d.ts +6 -6
  31. package/dist/styles.css +59 -1
  32. package/dist/tailwind/preset.js.map +1 -1
  33. package/package.json +6 -1
@@ -1,16 +1,16 @@
1
1
  import { Control, FieldErrors, FieldValues, UseFormClearErrors, UseFormGetFieldState, UseFormGetValues, UseFormRegister, UseFormReset, UseFormSetError, UseFormSetValue, UseFormTrigger, UseFormUnregister, UseFormWatch } from 'react-hook-form';
2
2
  export interface FormContextValue {
3
- control: Control<FieldValues>;
4
- register: UseFormRegister<FieldValues>;
3
+ control?: Control<FieldValues>;
4
+ register?: UseFormRegister<FieldValues>;
5
5
  errors: FieldErrors<FieldValues>;
6
6
  setValue: UseFormSetValue<FieldValues>;
7
- getValues: UseFormGetValues<FieldValues>;
8
- watch: UseFormWatch<FieldValues>;
7
+ getValues?: UseFormGetValues<FieldValues>;
8
+ watch?: UseFormWatch<FieldValues>;
9
9
  reset: UseFormReset<FieldValues>;
10
- trigger: UseFormTrigger<FieldValues>;
10
+ trigger?: UseFormTrigger<FieldValues>;
11
11
  clearErrors: UseFormClearErrors<FieldValues>;
12
12
  setError: UseFormSetError<FieldValues>;
13
- getFieldState: UseFormGetFieldState<FieldValues>;
13
+ getFieldState?: UseFormGetFieldState<FieldValues>;
14
14
  unregister: UseFormUnregister<FieldValues>;
15
15
  isDirty: boolean;
16
16
  isSubmitted: boolean;
package/dist/styles.css CHANGED
@@ -70,6 +70,7 @@
70
70
  --color-black: #000;
71
71
  --color-white: #fefefe;
72
72
  --spacing: 0.25rem;
73
+ --container-xs: 20rem;
73
74
  --container-sm: 24rem;
74
75
  --container-md: 28rem;
75
76
  --container-lg: 32rem;
@@ -110,13 +111,15 @@
110
111
  --color-brand-300: #8ecc69;
111
112
  --color-brand-200: #9cd27c;
112
113
  --color-brand-100: #aad98f;
114
+ --color-brand-50: #b8dfa2;
113
115
  --color-brand-40: #cae7b9;
114
116
  --color-brand-20: #edf7e8;
115
117
  --radius-full: 9999px;
116
118
  --shadow-z1: 0 1px 2px 0 rgba(0, 0, 0, 0.06);
117
119
  --shadow-z2: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
118
120
  --shadow-z3: 0 4px 8px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04);
119
- --shadow-z4: 0 1px 4px 0 rgba(0, 0, 0, 0.12), 0 12px 16px 0 rgba(0, 0, 0, 0.1), 0 3px 5px 0 rgba(0, 0, 0, 0.12);
121
+ --shadow-z4: 0 1px 4px 0 rgba(0, 0, 0, 0.12), 0 12px 16px 0 rgba(0, 0, 0, 0.1),
122
+ 0 3px 5px 0 rgba(0, 0, 0, 0.12);
120
123
  --shadow-z5: 0 8px 16px 0 rgba(0, 0, 0, 0.12), 0 24px 32px 0 rgba(0, 0, 0, 0.12);
121
124
  --font-ps: 'Noto Sans Armenian', 'Noto Sans', ui-sans-serif, system-ui, sans-serif;
122
125
  --text-h-xl: 64px;
@@ -369,6 +372,9 @@
369
372
  .static {
370
373
  position: static;
371
374
  }
375
+ .sticky {
376
+ position: sticky;
377
+ }
372
378
  .inset-0 {
373
379
  inset: 0px;
374
380
  }
@@ -534,6 +540,9 @@
534
540
  .mb-\[0\.4em\] {
535
541
  margin-bottom: 0.4em;
536
542
  }
543
+ .-ml-1 {
544
+ margin-left: calc(var(--spacing) * -1);
545
+ }
537
546
  .-ml-1\.5 {
538
547
  margin-left: calc(var(--spacing) * -1.5);
539
548
  }
@@ -783,6 +792,9 @@
783
792
  .w-0\.5 {
784
793
  width: calc(var(--spacing) * 0.5);
785
794
  }
795
+ .w-1 {
796
+ width: var(--spacing);
797
+ }
786
798
  .w-1\.5 {
787
799
  width: calc(var(--spacing) * 1.5);
788
800
  }
@@ -837,6 +849,9 @@
837
849
  .w-20 {
838
850
  width: calc(var(--spacing) * 20);
839
851
  }
852
+ .w-32 {
853
+ width: calc(var(--spacing) * 32);
854
+ }
840
855
  .w-40 {
841
856
  width: calc(var(--spacing) * 40);
842
857
  }
@@ -927,6 +942,9 @@
927
942
  .max-w-sm {
928
943
  max-width: var(--container-sm);
929
944
  }
945
+ .max-w-xs {
946
+ max-width: var(--container-xs);
947
+ }
930
948
  .min-w-0 {
931
949
  min-width: 0px;
932
950
  }
@@ -1056,6 +1074,12 @@
1056
1074
  .animate-spin {
1057
1075
  animation: var(--animate-spin);
1058
1076
  }
1077
+ .cursor-col-resize {
1078
+ cursor: col-resize;
1079
+ }
1080
+ .cursor-grab {
1081
+ cursor: grab;
1082
+ }
1059
1083
  .cursor-not-allowed {
1060
1084
  cursor: not-allowed;
1061
1085
  }
@@ -1068,6 +1092,9 @@
1068
1092
  .cursor-wait {
1069
1093
  cursor: wait;
1070
1094
  }
1095
+ .touch-none {
1096
+ touch-action: none;
1097
+ }
1071
1098
  .resize {
1072
1099
  resize: both;
1073
1100
  }
@@ -1267,6 +1294,10 @@
1267
1294
  border-top-right-radius: var(--radius-lg);
1268
1295
  border-bottom-right-radius: var(--radius-lg);
1269
1296
  }
1297
+ .rounded-b-lg {
1298
+ border-bottom-right-radius: var(--radius-lg);
1299
+ border-bottom-left-radius: var(--radius-lg);
1300
+ }
1270
1301
  .rounded-b-xl {
1271
1302
  border-bottom-right-radius: var(--radius-xl);
1272
1303
  border-bottom-left-radius: var(--radius-xl);
@@ -1478,6 +1509,9 @@
1478
1509
  .bg-brand-20 {
1479
1510
  background-color: var(--color-brand-20);
1480
1511
  }
1512
+ .bg-brand-50 {
1513
+ background-color: var(--color-brand-50);
1514
+ }
1481
1515
  .bg-brand-200\/15 {
1482
1516
  background-color: color-mix(in srgb, #9cd27c 15%, transparent);
1483
1517
  @supports (color: color-mix(in lab, red, red)) {
@@ -2205,6 +2239,10 @@
2205
2239
  --tw-outline-style: none;
2206
2240
  outline-style: none;
2207
2241
  }
2242
+ .select-all {
2243
+ -webkit-user-select: all;
2244
+ user-select: all;
2245
+ }
2208
2246
  .select-none {
2209
2247
  -webkit-user-select: none;
2210
2248
  user-select: none;
@@ -2430,6 +2468,9 @@
2430
2468
  background-color: color-mix(in oklab, var(--color-black) 10%, transparent);
2431
2469
  }
2432
2470
  }
2471
+ .hover\:bg-brand-300:hover {
2472
+ background-color: var(--color-brand-300);
2473
+ }
2433
2474
  .hover\:bg-brand-600:hover {
2434
2475
  background-color: var(--color-brand-600);
2435
2476
  }
@@ -2581,11 +2622,22 @@
2581
2622
  background-color: transparent;
2582
2623
  }
2583
2624
  }
2625
+ .data-\[resizing\]\:bg-brand-500[data-resizing] {
2626
+ background-color: var(--color-brand-500);
2627
+ }
2584
2628
  @media (prefers-reduced-motion: reduce) {
2585
2629
  .motion-reduce\:transition-none {
2586
2630
  transition-property: none;
2587
2631
  }
2588
2632
  }
2633
+ @media (width >= 48rem) {
2634
+ .md\:block {
2635
+ display: block;
2636
+ }
2637
+ .md\:hidden {
2638
+ display: none;
2639
+ }
2640
+ }
2589
2641
  .dark\:bg-brand-500\/10:where(.dark, .dark *) {
2590
2642
  background-color: color-mix(in srgb, #72bf44 10%, transparent);
2591
2643
  @supports (color: color-mix(in lab, red, red)) {
@@ -2685,6 +2737,12 @@
2685
2737
  --tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
2686
2738
  --tw-gradient-stops: var(--tw-gradient-via-stops);
2687
2739
  }
2740
+ .\[\&_svg\]\:h-4 svg {
2741
+ height: calc(var(--spacing) * 4);
2742
+ }
2743
+ .\[\&_svg\]\:w-4 svg {
2744
+ width: calc(var(--spacing) * 4);
2745
+ }
2688
2746
  .\[\&_svg\]\:opacity-0 svg {
2689
2747
  opacity: 0%;
2690
2748
  }
@@ -1 +1 @@
1
- {"version":3,"file":"preset.js","names":[],"sources":["../../src/tailwind/tokens.ts","../../src/tailwind/preset.ts"],"sourcesContent":["/**\n * Tailwind `theme.extend`-shaped token map, for consumer apps still using a\n * JS Tailwind config (v3-style, or v4 via the `@config` compatibility\n * directive). Every value points at the CSS custom properties defined in\n * `styles/tokens.css` / `styles/theme.css` — never a hardcoded value — so\n * this stays correct regardless of light/dark mode or future palette edits.\n *\n * Consumers on native Tailwind v4 CSS config don't need this file at all:\n * importing `@ps-tools/ui/styles.css` already registers these as Tailwind\n * theme values via `@theme`.\n */\n\nconst colorScale = (name: string, steps: readonly number[]) =>\n Object.fromEntries(steps.map((step) => [step, `var(--color-${name}-${step})`]));\n\nconst BRAND_STEPS = [20, 30, 40, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst GRAY_STEPS = [20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst TEN_STEP = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst PURPLE_STEPS = [20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst RED_STEPS = [20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\n\nexport const tailwindColors = {\n white: 'var(--color-white)',\n brand: colorScale('brand', BRAND_STEPS),\n gray: colorScale('gray', GRAY_STEPS),\n green: colorScale('green', TEN_STEP),\n blue: colorScale('blue', TEN_STEP),\n purple: colorScale('purple', PURPLE_STEPS),\n pink: colorScale('pink', TEN_STEP),\n red: colorScale('red', RED_STEPS),\n yellow: colorScale('yellow', TEN_STEP),\n\n /* Semantic aliases — prefer these over raw scales in components. */\n 'bg-default': 'var(--color-bg-default)',\n 'bg-container': 'var(--color-bg-container)',\n 'bg-subtle': 'var(--color-bg-subtle)',\n 'bg-brand-lighter': 'var(--color-bg-brand-lighter)',\n 'bg-info-lighter': 'var(--color-bg-info-lighter)',\n 'bg-success-lighter': 'var(--color-bg-success-lighter)',\n 'bg-warning-lighter': 'var(--color-bg-warning-lighter)',\n 'bg-danger-lighter': 'var(--color-bg-danger-lighter)',\n\n 'fg-default': 'var(--color-fg-default)',\n 'fg-secondary': 'var(--color-fg-secondary)',\n 'fg-tertiary': 'var(--color-fg-tertiary)',\n 'fg-disabled': 'var(--color-fg-disabled)',\n 'fg-inverse': 'var(--color-fg-inverse)',\n 'fg-brand': 'var(--color-fg-brand)',\n 'fg-info': 'var(--color-fg-info)',\n 'fg-success': 'var(--color-fg-success)',\n 'fg-warning': 'var(--color-fg-warning)',\n 'fg-danger': 'var(--color-fg-danger)',\n\n 'border-default': 'var(--color-border-default)',\n 'border-subtle': 'var(--color-border-subtle)',\n 'border-strong': 'var(--color-border-strong)',\n 'border-brand': 'var(--color-border-brand)',\n\n 'icon-primary': 'var(--color-icon-primary)',\n 'icon-secondary': 'var(--color-icon-secondary)',\n 'icon-inverse': 'var(--color-icon-inverse)',\n 'icon-brand': 'var(--color-icon-brand)',\n 'icon-info': 'var(--color-icon-info)',\n 'icon-danger': 'var(--color-icon-danger)',\n 'icon-warning': 'var(--color-icon-warning)',\n} as const;\n\nexport const tailwindBorderRadius = {\n xs: 'var(--radius-xs)',\n sm: 'var(--radius-sm)',\n md: 'var(--radius-md)',\n lg: 'var(--radius-lg)',\n xl: 'var(--radius-xl)',\n '2xl': 'var(--radius-2xl)',\n '3xl': 'var(--radius-3xl)',\n full: 'var(--radius-full)',\n} as const;\n\nexport const tailwindBoxShadow = {\n z1: 'var(--shadow-z1)',\n z2: 'var(--shadow-z2)',\n z3: 'var(--shadow-z3)',\n z4: 'var(--shadow-z4)',\n z5: 'var(--shadow-z5)',\n} as const;\n\nexport const tailwindFontFamily = {\n ps: 'var(--font-ps)',\n sans: 'var(--font-sans)',\n} as const;\n\nconst textStyle = (name: string) => [`var(--text-${name})`, { lineHeight: `var(--text-${name}--line-height)` }];\n\nexport const tailwindFontSize = {\n 'h-xl': textStyle('h-xl'),\n 'h-lg': textStyle('h-lg'),\n 'h-md': textStyle('h-md'),\n 'h-std': textStyle('h-std'),\n 'h-sm': textStyle('h-sm'),\n 'h-xs': textStyle('h-xs'),\n\n 'p-lg': textStyle('p-lg'),\n 'p-md': textStyle('p-md'),\n 'p-std': textStyle('p-std'),\n 'p-sm': textStyle('p-sm'),\n 'p-xs': textStyle('p-xs'),\n\n 'label-lg': textStyle('label-lg'),\n 'label-md': textStyle('label-md'),\n 'label-std': textStyle('label-std'),\n 'label-sm': textStyle('label-sm'),\n 'label-xs': textStyle('label-xs'),\n 'label-xxs': textStyle('label-xxs'),\n} as const;\n","import {\n tailwindBorderRadius,\n tailwindBoxShadow,\n tailwindColors,\n tailwindFontFamily,\n tailwindFontSize,\n} from './tokens';\n\n/**\n * Minimal shape of the config fragment we export. Kept local instead of\n * importing Tailwind's own config type so this file has zero build-time\n * dependency on `tailwindcss` internals — it's just plain data.\n */\nexport interface UiPreset {\n darkMode: 'class';\n theme: {\n extend: {\n colors: typeof tailwindColors;\n borderRadius: typeof tailwindBorderRadius;\n boxShadow: typeof tailwindBoxShadow;\n fontFamily: typeof tailwindFontFamily;\n fontSize: typeof tailwindFontSize;\n };\n };\n}\n\n/**\n * Tailwind preset for consumer apps still on a JS config (Tailwind v3, or\n * v4 via the `@config` compatibility directive). Spread it into your own\n * config's `presets` array:\n *\n * ```js\n * // tailwind.config.js\n * import { uiPreset } from '@ps-tools/ui/preset';\n *\n * export default {\n * presets: [uiPreset],\n * content: [\n * './src/**\\/*.{ts,tsx}',\n * './node_modules/@ps-tools/ui/dist/**\\/*.js',\n * ],\n * };\n * ```\n *\n * Native Tailwind v4 CSS-config consumers don't need this — importing\n * `@ps-tools/ui/styles.css` already registers every token via `@theme inline`.\n */\nexport const uiPreset: UiPreset = {\n darkMode: 'class',\n theme: {\n extend: {\n colors: tailwindColors,\n borderRadius: tailwindBorderRadius,\n boxShadow: tailwindBoxShadow,\n fontFamily: tailwindFontFamily,\n fontSize: tailwindFontSize,\n },\n },\n};\n\nexport default uiPreset;\n"],"mappings":";AAYA,IAAM,KAAc,GAAc,MAChC,OAAO,YAAY,EAAM,KAAK,MAAS,CAAC,GAAM,eAAe,EAAK,GAAG,EAAK,EAAE,CAAC,CAAC,GAE1E,IAAc;CAAC;CAAI;CAAI;CAAI;CAAI;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AA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,EAAK,IAAI,EAAE,YAAY,cAAc,EAAK,gBAAgB,CAAC,GC5CjG,IAAqB;CAChC,UAAU;CACV,OAAO,EACL,QAAQ;EACN,QAAQ;EACR,cAAc;EACd,WAAW;EACX,YAAY;EACZ,UAAU;GDuCd,QAAQ,EAAU,MAAM;GACxB,QAAQ,EAAU,MAAM;GACxB,QAAQ,EAAU,MAAM;GACxB,SAAS,EAAU,OAAO;GAC1B,QAAQ,EAAU,MAAM;GACxB,QAAQ,EAAU,MAAM;GAExB,QAAQ,EAAU,MAAM;GACxB,QAAQ,EAAU,MAAM;GACxB,SAAS,EAAU,OAAO;GAC1B,QAAQ,EAAU,MAAM;GACxB,QAAQ,EAAU,MAAM;GAExB,YAAY,EAAU,UAAU;GAChC,YAAY,EAAU,UAAU;GAChC,aAAa,EAAU,WAAW;GAClC,YAAY,EAAU,UAAU;GAChC,YAAY,EAAU,UAAU;GAChC,aAAa,EAAU,WAAW;ECzDpB;CACZ,EACF;AACF"}
1
+ {"version":3,"file":"preset.js","names":[],"sources":["../../src/tailwind/tokens.ts","../../src/tailwind/preset.ts"],"sourcesContent":["/**\n * Tailwind `theme.extend`-shaped token map, for consumer apps still using a\n * JS Tailwind config (v3-style, or v4 via the `@config` compatibility\n * directive). Every value points at the CSS custom properties defined in\n * `styles/tokens.css` / `styles/theme.css` — never a hardcoded value — so\n * this stays correct regardless of light/dark mode or future palette edits.\n *\n * Consumers on native Tailwind v4 CSS config don't need this file at all:\n * importing `@ps-tools/ui/styles.css` already registers these as Tailwind\n * theme values via `@theme`.\n */\n\nconst colorScale = (name: string, steps: readonly number[]) =>\n Object.fromEntries(steps.map((step) => [step, `var(--color-${name}-${step})`]));\n\nconst BRAND_STEPS = [20, 30, 40, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst GRAY_STEPS = [20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst TEN_STEP = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst PURPLE_STEPS = [20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\nconst RED_STEPS = [20, 50, 100, 200, 300, 400, 500, 600, 700, 800, 900] as const;\n\nexport const tailwindColors = {\n white: 'var(--color-white)',\n brand: colorScale('brand', BRAND_STEPS),\n gray: colorScale('gray', GRAY_STEPS),\n green: colorScale('green', TEN_STEP),\n blue: colorScale('blue', TEN_STEP),\n purple: colorScale('purple', PURPLE_STEPS),\n pink: colorScale('pink', TEN_STEP),\n red: colorScale('red', RED_STEPS),\n yellow: colorScale('yellow', TEN_STEP),\n\n /* Semantic aliases — prefer these over raw scales in components. */\n 'bg-default': 'var(--color-bg-default)',\n 'bg-container': 'var(--color-bg-container)',\n 'bg-subtle': 'var(--color-bg-subtle)',\n 'bg-brand-lighter': 'var(--color-bg-brand-lighter)',\n 'bg-info-lighter': 'var(--color-bg-info-lighter)',\n 'bg-success-lighter': 'var(--color-bg-success-lighter)',\n 'bg-warning-lighter': 'var(--color-bg-warning-lighter)',\n 'bg-danger-lighter': 'var(--color-bg-danger-lighter)',\n\n 'fg-default': 'var(--color-fg-default)',\n 'fg-secondary': 'var(--color-fg-secondary)',\n 'fg-tertiary': 'var(--color-fg-tertiary)',\n 'fg-disabled': 'var(--color-fg-disabled)',\n 'fg-inverse': 'var(--color-fg-inverse)',\n 'fg-brand': 'var(--color-fg-brand)',\n 'fg-info': 'var(--color-fg-info)',\n 'fg-success': 'var(--color-fg-success)',\n 'fg-warning': 'var(--color-fg-warning)',\n 'fg-danger': 'var(--color-fg-danger)',\n\n 'border-default': 'var(--color-border-default)',\n 'border-subtle': 'var(--color-border-subtle)',\n 'border-strong': 'var(--color-border-strong)',\n 'border-brand': 'var(--color-border-brand)',\n\n 'icon-primary': 'var(--color-icon-primary)',\n 'icon-secondary': 'var(--color-icon-secondary)',\n 'icon-inverse': 'var(--color-icon-inverse)',\n 'icon-brand': 'var(--color-icon-brand)',\n 'icon-info': 'var(--color-icon-info)',\n 'icon-danger': 'var(--color-icon-danger)',\n 'icon-warning': 'var(--color-icon-warning)',\n} as const;\n\nexport const tailwindBorderRadius = {\n xs: 'var(--radius-xs)',\n sm: 'var(--radius-sm)',\n md: 'var(--radius-md)',\n lg: 'var(--radius-lg)',\n xl: 'var(--radius-xl)',\n '2xl': 'var(--radius-2xl)',\n '3xl': 'var(--radius-3xl)',\n full: 'var(--radius-full)',\n} as const;\n\nexport const tailwindBoxShadow = {\n z1: 'var(--shadow-z1)',\n z2: 'var(--shadow-z2)',\n z3: 'var(--shadow-z3)',\n z4: 'var(--shadow-z4)',\n z5: 'var(--shadow-z5)',\n} as const;\n\nexport const tailwindFontFamily = {\n ps: 'var(--font-ps)',\n sans: 'var(--font-sans)',\n} as const;\n\nconst textStyle = (name: string) => [\n `var(--text-${name})`,\n { lineHeight: `var(--text-${name}--line-height)` },\n];\n\nexport const tailwindFontSize = {\n 'h-xl': textStyle('h-xl'),\n 'h-lg': textStyle('h-lg'),\n 'h-md': textStyle('h-md'),\n 'h-std': textStyle('h-std'),\n 'h-sm': textStyle('h-sm'),\n 'h-xs': textStyle('h-xs'),\n\n 'p-lg': textStyle('p-lg'),\n 'p-md': textStyle('p-md'),\n 'p-std': textStyle('p-std'),\n 'p-sm': textStyle('p-sm'),\n 'p-xs': textStyle('p-xs'),\n\n 'label-lg': textStyle('label-lg'),\n 'label-md': textStyle('label-md'),\n 'label-std': textStyle('label-std'),\n 'label-sm': textStyle('label-sm'),\n 'label-xs': textStyle('label-xs'),\n 'label-xxs': textStyle('label-xxs'),\n} as const;\n","import {\n tailwindBorderRadius,\n tailwindBoxShadow,\n tailwindColors,\n tailwindFontFamily,\n tailwindFontSize,\n} from './tokens';\n\n/**\n * Minimal shape of the config fragment we export. Kept local instead of\n * importing Tailwind's own config type so this file has zero build-time\n * dependency on `tailwindcss` internals — it's just plain data.\n */\nexport interface UiPreset {\n darkMode: 'class';\n theme: {\n extend: {\n colors: typeof tailwindColors;\n borderRadius: typeof tailwindBorderRadius;\n boxShadow: typeof tailwindBoxShadow;\n fontFamily: typeof tailwindFontFamily;\n fontSize: typeof tailwindFontSize;\n };\n };\n}\n\n/**\n * Tailwind preset for consumer apps still on a JS config (Tailwind v3, or\n * v4 via the `@config` compatibility directive). Spread it into your own\n * config's `presets` array:\n *\n * ```js\n * // tailwind.config.js\n * import { uiPreset } from '@ps-tools/ui/preset';\n *\n * export default {\n * presets: [uiPreset],\n * content: [\n * './src/**\\/*.{ts,tsx}',\n * './node_modules/@ps-tools/ui/dist/**\\/*.js',\n * ],\n * };\n * ```\n *\n * Native Tailwind v4 CSS-config consumers don't need this — importing\n * `@ps-tools/ui/styles.css` already registers every token via `@theme inline`.\n */\nexport const uiPreset: UiPreset = {\n darkMode: 'class',\n theme: {\n extend: {\n colors: tailwindColors,\n borderRadius: tailwindBorderRadius,\n boxShadow: tailwindBoxShadow,\n fontFamily: tailwindFontFamily,\n fontSize: tailwindFontSize,\n },\n },\n};\n\nexport default uiPreset;\n"],"mappings":";AAYA,IAAM,KAAc,GAAc,MAChC,OAAO,YAAY,EAAM,KAAK,MAAS,CAAC,GAAM,eAAe,EAAK,GAAG,EAAK,EAAE,CAAC,CAAC,GAE1E,IAAc;CAAC;CAAI;CAAI;CAAI;CAAI;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,GAC1E,IAAa;CAAC;CAAI;CAAI;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,GACjE,IAAW;CAAC;CAAI;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;CAAK;AAAG,GAIpD,IAAiB;CAC5B,OAAO;CACP,OAAO,EAAW,SAAS,CAAW;CACtC,MAAM,EAAW,QAAQ,CAAU;CACnC,OAAO,EAAW,SAAS,CAAQ;CACnC,MAAM,EAAW,QAAQ,CAAQ;CACjC,QAAQ,EAAW,UAAU;EATT;EAAI;EAAI;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;EAAK;CASvC,CAAY;C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AQ,EAAU,MAAM;GAExB,YAAY,EAAU,UAAU;GAChC,YAAY,EAAU,UAAU;GAChC,aAAa,EAAU,WAAW;GAClC,YAAY,EAAU,UAAU;GAChC,YAAY,EAAU,UAAU;GAChC,aAAa,EAAU,WAAW;EC5DpB;CACZ,EACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dinofront/design_system",
3
- "version": "1.2.2",
3
+ "version": "1.3.0",
4
4
  "description": "Enterprise React component library and design system built on Tailwind CSS.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,6 +57,11 @@
57
57
  }
58
58
  },
59
59
  "dependencies": {
60
+ "@dnd-kit/core": "^6.3.1",
61
+ "@dnd-kit/sortable": "^10.0.0",
62
+ "@dnd-kit/utilities": "^3.2.2",
63
+ "@tanstack/react-table": "^8.21.3",
64
+ "@tanstack/react-virtual": "^3.14.9",
60
65
  "class-variance-authority": "^0.7.1",
61
66
  "clsx": "^2.1.1",
62
67
  "lucide-react": "^1.25.0",