@yuva-devlab/ui 1.4.3 → 2.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.
Files changed (91) hide show
  1. package/README.md +172 -128
  2. package/dist/components/accordion/accordion.mdx +18 -0
  3. package/dist/components/alert/alert.css +2 -2
  4. package/dist/components/alert-dialog/alert-dialog.mdx +18 -0
  5. package/dist/components/aspect-ratio/aspect-ratio.mdx +22 -0
  6. package/dist/components/breadcrumb/breadcrumb.mdx +18 -0
  7. package/dist/components/calendar/calendar-nav.css +111 -0
  8. package/dist/components/calendar/calendar.css +183 -0
  9. package/dist/components/calendar/calendar.mdx +18 -0
  10. package/dist/components/card/card.css +4 -4
  11. package/dist/components/carousel/carousel.css +4 -4
  12. package/dist/components/carousel/carousel.mdx +18 -0
  13. package/dist/components/chart/chart.css +86 -0
  14. package/dist/components/chart/chart.mdx +18 -0
  15. package/dist/components/checkbox/checkbox.css +11 -0
  16. package/dist/components/collapsible/collapsible.mdx +18 -0
  17. package/dist/components/command/command.css +3 -3
  18. package/dist/components/command/command.mdx +18 -0
  19. package/dist/components/confirm-dialog/confirm-dialog.mdx +18 -0
  20. package/dist/components/context-menu/context-menu.mdx +18 -0
  21. package/dist/components/copy-button/copy-button.css +2 -0
  22. package/dist/components/copy-button/copy-button.mdx +18 -0
  23. package/dist/components/date-picker/date-picker.css +11 -5
  24. package/dist/components/date-picker/date-picker.mdx +18 -0
  25. package/dist/components/dialog/dialog.css +6 -6
  26. package/dist/components/drawer/drawer.mdx +18 -0
  27. package/dist/components/dropdown-menu/dropdown-menu.css +18 -0
  28. package/dist/components/dropdown-menu/dropdown-menu.mdx +18 -0
  29. package/dist/components/empty-state/empty-state.css +67 -0
  30. package/dist/components/empty-state/empty-state.mdx +18 -0
  31. package/dist/components/form/form.mdx +18 -0
  32. package/dist/components/hover-card/hover-card.mdx +18 -0
  33. package/dist/components/input-otp/input-otp.mdx +18 -0
  34. package/dist/components/label/label.mdx +18 -0
  35. package/dist/components/layout/layout.css +158 -0
  36. package/dist/components/layout/layout.mdx +30 -0
  37. package/dist/components/loading-state/loading-state.css +11 -0
  38. package/dist/components/loading-state/loading-state.mdx +18 -0
  39. package/dist/components/menubar/menubar.css +4 -4
  40. package/dist/components/menubar/menubar.mdx +18 -0
  41. package/dist/components/metric-card/metric-card.mdx +18 -0
  42. package/dist/components/navigation-menu/navigation-menu.css +2 -2
  43. package/dist/components/navigation-menu/navigation-menu.mdx +18 -0
  44. package/dist/components/pagination/pagination.css +8 -2
  45. package/dist/components/pagination/pagination.mdx +18 -0
  46. package/dist/components/panel/panel.mdx +18 -0
  47. package/dist/components/popover/popover.css +7 -2
  48. package/dist/components/popover/popover.mdx +18 -0
  49. package/dist/components/radio-group/radio-group.mdx +18 -0
  50. package/dist/components/resizable/resizable.mdx +18 -0
  51. package/dist/components/scroll-area/scroll-area.mdx +18 -0
  52. package/dist/components/searchable-select/searchable-select.css +26 -3
  53. package/dist/components/searchable-select/searchable-select.mdx +18 -0
  54. package/dist/components/secret-reveal-card/secret-reveal-card.css +9 -0
  55. package/dist/components/secret-reveal-card/secret-reveal-card.mdx +18 -0
  56. package/dist/components/select/select.css +16 -1
  57. package/dist/components/separator/separator.mdx +18 -0
  58. package/dist/components/sheet/sheet.css +5 -1
  59. package/dist/components/sheet/sheet.mdx +18 -0
  60. package/dist/components/sidebar/sidebar-menu.css +183 -0
  61. package/dist/components/sidebar/sidebar-submenu.css +69 -0
  62. package/dist/components/sidebar/sidebar.css +171 -4
  63. package/dist/components/sidebar/sidebar.mdx +18 -0
  64. package/dist/components/slider/slider.mdx +18 -0
  65. package/dist/components/status-chip/status-chip.mdx +18 -0
  66. package/dist/components/table/table.css +5 -3
  67. package/dist/components/tabs/tabs.css +3 -3
  68. package/dist/components/textarea/textarea.css +3 -3
  69. package/dist/components/textarea/textarea.mdx +18 -0
  70. package/dist/components/toggle/toggle.css +9 -9
  71. package/dist/components/toggle/toggle.mdx +18 -0
  72. package/dist/components/toggle-group/toggle-group.mdx +18 -0
  73. package/dist/components/tooltip/tooltip.mdx +18 -0
  74. package/dist/components/typography/heading.mdx +36 -0
  75. package/dist/components/typography/text.mdx +34 -0
  76. package/dist/components/typography/typography.css +98 -0
  77. package/dist/components.css +1366 -118
  78. package/dist/index.cjs +1239 -1008
  79. package/dist/index.cjs.map +1 -1
  80. package/dist/index.d.cts +662 -197
  81. package/dist/index.d.ts +662 -197
  82. package/dist/index.js +1220 -1011
  83. package/dist/index.js.map +1 -1
  84. package/dist/preset.css +2 -4
  85. package/dist/styles/components.css +1366 -118
  86. package/dist/styles/preset.css +2 -4
  87. package/dist/styles/styles.css +7 -4
  88. package/dist/styles/utilities.css +137 -0
  89. package/dist/styles.css +7 -4
  90. package/dist/utilities.css +137 -0
  91. package/package.json +22 -4
@@ -0,0 +1,18 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as StatusChipStories from "./status-chip.stories";
3
+
4
+ <Meta of={StatusChipStories} />
5
+
6
+ <Title />
7
+
8
+ # Status Chip
9
+
10
+ Compact lifecycle status badge displaying status tones and indicator dots.
11
+
12
+ ## Default
13
+
14
+ <Canvas of={StatusChipStories.Default} />
15
+
16
+ ## Component Properties
17
+
18
+ <Controls />
@@ -28,15 +28,17 @@
28
28
  transition: background-color 0.1s;
29
29
  }
30
30
  .dl-table__head-cell {
31
- height: 2.5rem;
32
- padding: 0 0.5rem;
31
+ height: var(--control-height-md, 2.5rem);
32
+ padding: var(--table-row-padding-y, 0.5rem)
33
+ var(--table-row-padding-x, 0.75rem);
33
34
  text-align: left;
34
35
  font-weight: 500;
35
36
  color: var(--muted-foreground);
36
37
  white-space: nowrap;
37
38
  }
38
39
  .dl-table__cell {
39
- padding: 0.75rem 0.5rem;
40
+ padding: var(--table-row-padding-y, 0.75rem)
41
+ var(--table-row-padding-x, 0.75rem);
40
42
  vertical-align: middle;
41
43
  }
42
44
  .dl-table__caption {
@@ -1,9 +1,9 @@
1
1
  .dl-tabs-list {
2
2
  display: inline-flex;
3
- height: 2.25rem;
3
+ height: var(--control-height-md, 2.25rem);
4
4
  align-items: center;
5
5
  justify-content: center;
6
- border-radius: var(--radius-lg, 0.5rem);
6
+ border-radius: var(--radius, 0.5rem);
7
7
  background-color: var(--muted);
8
8
  padding: 0.25rem;
9
9
  color: var(--muted-foreground);
@@ -13,7 +13,7 @@
13
13
  align-items: center;
14
14
  justify-content: center;
15
15
  white-space: nowrap;
16
- border-radius: var(--radius-md, 0.375rem);
16
+ border-radius: calc(var(--radius, 0.5rem) - 2px);
17
17
  padding: 0.25rem 0.75rem;
18
18
  font-size: 0.875rem;
19
19
  font-weight: 500;
@@ -2,11 +2,11 @@
2
2
  display: block;
3
3
  min-height: 4rem;
4
4
  width: 100%;
5
- border-radius: var(--radius-md, 0.375rem);
5
+ border-radius: var(--radius, 0.375rem);
6
6
  border: 1px solid var(--input);
7
7
  background-color: transparent;
8
- padding-block: 0.5rem;
9
- padding-inline: 0.75rem;
8
+ padding-block: var(--space-2, 0.5rem);
9
+ padding-inline: var(--space-3, 0.75rem);
10
10
  font-size: 0.75rem;
11
11
  font-family: inherit;
12
12
  color: var(--foreground);
@@ -0,0 +1,18 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as TextareaStories from "./textarea.stories";
3
+
4
+ <Meta of={TextareaStories} />
5
+
6
+ <Title />
7
+
8
+ # Textarea
9
+
10
+ Multi-line form text input element supporting token-based borders, focus rings, and sizing.
11
+
12
+ ## Default
13
+
14
+ <Canvas of={TextareaStories.Default} />
15
+
16
+ ## Component Properties
17
+
18
+ <Controls />
@@ -65,21 +65,21 @@
65
65
 
66
66
  /* Sizes */
67
67
  .dl-toggle--size-default {
68
- height: 2.25rem;
69
- padding-inline: 0.5rem;
70
- min-width: 2.25rem;
68
+ height: var(--control-height-md, 2.25rem);
69
+ padding-inline: var(--space-2, 0.5rem);
70
+ min-width: var(--control-height-md, 2.25rem);
71
71
  }
72
72
 
73
73
  .dl-toggle--size-sm {
74
- height: 2rem;
75
- padding-inline: 0.375rem;
76
- min-width: 2rem;
74
+ height: var(--control-height-sm, 2rem);
75
+ padding-inline: calc(var(--space-2, 0.5rem) - 2px);
76
+ min-width: var(--control-height-sm, 2rem);
77
77
  }
78
78
 
79
79
  .dl-toggle--size-lg {
80
- height: 2.5rem;
81
- padding-inline: 0.625rem;
82
- min-width: 2.5rem;
80
+ height: var(--control-height-lg, 2.5rem);
81
+ padding-inline: var(--space-3, 0.75rem);
82
+ min-width: var(--control-height-lg, 2.5rem);
83
83
  }
84
84
 
85
85
  /* Group */
@@ -0,0 +1,18 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as ToggleStories from "./toggle.stories";
3
+
4
+ <Meta of={ToggleStories} />
5
+
6
+ <Title />
7
+
8
+ # Toggle
9
+
10
+ Two-state button that can be either on or off.
11
+
12
+ ## Default
13
+
14
+ <Canvas of={ToggleStories.Default} />
15
+
16
+ ## Component Properties
17
+
18
+ <Controls />
@@ -0,0 +1,18 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as ToggleGroupStories from "./toggle-group.stories";
3
+
4
+ <Meta of={ToggleGroupStories} />
5
+
6
+ <Title />
7
+
8
+ # Toggle Group
9
+
10
+ Group of two-state toggle buttons configured for single or multiple selection.
11
+
12
+ ## Default
13
+
14
+ <Canvas of={ToggleGroupStories.Default} />
15
+
16
+ ## Component Properties
17
+
18
+ <Controls />
@@ -0,0 +1,18 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as TooltipStories from "./tooltip.stories";
3
+
4
+ <Meta of={TooltipStories} />
5
+
6
+ <Title />
7
+
8
+ # Tooltip
9
+
10
+ Popup that displays contextual information related to an element when focused or hovered.
11
+
12
+ ## Default
13
+
14
+ <Canvas of={TooltipStories.Default} />
15
+
16
+ ## Component Properties
17
+
18
+ <Controls />
@@ -0,0 +1,36 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as HeadingStories from "./heading.stories";
3
+
4
+ <Meta of={HeadingStories} />
5
+
6
+ <Title />
7
+
8
+ # Heading
9
+
10
+ Accessible typography heading primitive that decouples semantic DOM hierarchy (`as="h1"`) from visual presentation size (`size="h3"`).
11
+
12
+ ## Default
13
+
14
+ <Canvas of={HeadingStories.Default} />
15
+
16
+ ## All Sizes
17
+
18
+ Available in `display`, `h1`, `h2`, `h3`, `h4`, `h5`, and `h6`.
19
+
20
+ <Canvas of={HeadingStories.AllSizes} />
21
+
22
+ ## Decoupled Semantic Hierarchy
23
+
24
+ Ensures document accessibility and SEO compliance by allowing headings to render the correct semantic level while visually matching the UI design specs.
25
+
26
+ <Canvas of={HeadingStories.DecoupledHierarchy} />
27
+
28
+ ## Color Variants
29
+
30
+ Supports semantic token colors: `default`, `primary`, `muted`, `success`, `warning`, `destructive`, and `info`.
31
+
32
+ <Canvas of={HeadingStories.ColorVariants} />
33
+
34
+ ## Component Properties
35
+
36
+ <Controls />
@@ -0,0 +1,34 @@
1
+ import { Meta, Title, Description, Canvas, Controls } from "@storybook/blocks";
2
+ import * as TextStories from "./text.stories";
3
+
4
+ <Meta of={TextStories} />
5
+
6
+ <Title />
7
+
8
+ # Text
9
+
10
+ Versatile body, caption, code, and metric typography primitive with semantic color tokens and responsive hierarchy.
11
+
12
+ ## Default
13
+
14
+ <Canvas of={TextStories.Default} />
15
+
16
+ ## All Variants
17
+
18
+ Available in `body-lg`, `body`, `body-sm`, `caption`, `code`, and `metric`.
19
+
20
+ <Canvas of={TextStories.AllVariants} />
21
+
22
+ ## Color Variants
23
+
24
+ Supports `default`, `muted`, `subtle`, `primary`, `success`, `warning`, `destructive`, and `info`.
25
+
26
+ <Canvas of={TextStories.ColorVariants} />
27
+
28
+ ## Single-Line Truncation
29
+
30
+ <Canvas of={TextStories.Truncated} />
31
+
32
+ ## Component Properties
33
+
34
+ <Controls />
@@ -0,0 +1,98 @@
1
+ /**
2
+ * @file typography.css
3
+ * @description Typography primitive styling and modifier attributes.
4
+ * Governed by W3C Cascade Layers.
5
+ */
6
+
7
+ @layer dl-components {
8
+ /* ── Color Modifiers ───────────────────────────────────────────────────── */
9
+ .dl-heading[data-typography-color="default"],
10
+ .dl-text[data-typography-color="default"] {
11
+ color: var(--foreground);
12
+ }
13
+
14
+ .dl-heading[data-typography-color="muted"],
15
+ .dl-text[data-typography-color="muted"] {
16
+ color: var(--muted-foreground);
17
+ }
18
+
19
+ .dl-heading[data-typography-color="subtle"],
20
+ .dl-text[data-typography-color="subtle"] {
21
+ color: color-mix(in oklch, var(--muted-foreground) 80%, transparent);
22
+ }
23
+
24
+ .dl-heading[data-typography-color="primary"],
25
+ .dl-text[data-typography-color="primary"] {
26
+ color: var(--primary);
27
+ }
28
+
29
+ .dl-heading[data-typography-color="destructive"],
30
+ .dl-text[data-typography-color="destructive"] {
31
+ color: var(--destructive);
32
+ }
33
+
34
+ .dl-heading[data-typography-color="warning"],
35
+ .dl-text[data-typography-color="warning"] {
36
+ color: var(--warning);
37
+ }
38
+
39
+ .dl-heading[data-typography-color="success"],
40
+ .dl-text[data-typography-color="success"] {
41
+ color: var(--success);
42
+ }
43
+
44
+ .dl-heading[data-typography-color="info"],
45
+ .dl-text[data-typography-color="info"] {
46
+ color: var(--info);
47
+ }
48
+
49
+ /* ── Alignment Modifiers ───────────────────────────────────────────────── */
50
+ .dl-heading[data-typography-align="left"],
51
+ .dl-text[data-typography-align="left"] {
52
+ text-align: left;
53
+ }
54
+
55
+ .dl-heading[data-typography-align="center"],
56
+ .dl-text[data-typography-align="center"] {
57
+ text-align: center;
58
+ }
59
+
60
+ .dl-heading[data-typography-align="right"],
61
+ .dl-text[data-typography-align="right"] {
62
+ text-align: right;
63
+ }
64
+
65
+ /* ── Truncation Modifier ───────────────────────────────────────────────── */
66
+ .dl-heading[data-typography-truncate="true"],
67
+ .dl-text[data-typography-truncate="true"] {
68
+ overflow: hidden;
69
+ text-overflow: ellipsis;
70
+ white-space: nowrap;
71
+ }
72
+
73
+ /* ── Weight Overrides ──────────────────────────────────────────────────── */
74
+ .dl-heading[data-typography-weight="normal"],
75
+ .dl-text[data-typography-weight="normal"] {
76
+ font-weight: 400;
77
+ }
78
+
79
+ .dl-heading[data-typography-weight="medium"],
80
+ .dl-text[data-typography-weight="medium"] {
81
+ font-weight: 500;
82
+ }
83
+
84
+ .dl-heading[data-typography-weight="semibold"],
85
+ .dl-text[data-typography-weight="semibold"] {
86
+ font-weight: 600;
87
+ }
88
+
89
+ .dl-heading[data-typography-weight="bold"],
90
+ .dl-text[data-typography-weight="bold"] {
91
+ font-weight: 700;
92
+ }
93
+
94
+ .dl-heading[data-typography-weight="extrabold"],
95
+ .dl-text[data-typography-weight="extrabold"] {
96
+ font-weight: 800;
97
+ }
98
+ }