@accelint/design-toolkit 2.2.1 → 2.3.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.
Files changed (136) hide show
  1. package/README.md +1 -0
  2. package/dist/components/accordion/index.d.ts +2 -2
  3. package/dist/components/accordion/index.js +1 -1
  4. package/dist/components/accordion/index.js.map +1 -1
  5. package/dist/components/accordion/styles.d.ts +3 -39
  6. package/dist/components/accordion/styles.js +1 -1
  7. package/dist/components/accordion/styles.js.map +1 -1
  8. package/dist/components/avatar/index.d.ts +4 -4
  9. package/dist/components/badge/index.d.ts +2 -2
  10. package/dist/components/box/index.d.ts +3 -3
  11. package/dist/components/button/index.d.ts +35 -23
  12. package/dist/components/button/index.js +1 -1
  13. package/dist/components/button/index.js.map +1 -1
  14. package/dist/components/button/styles.d.ts +297 -0
  15. package/dist/components/button/styles.js +2 -0
  16. package/dist/components/button/styles.js.map +1 -0
  17. package/dist/components/button/types.d.ts +14 -0
  18. package/dist/components/button/types.js +2 -0
  19. package/dist/components/button/types.js.map +1 -0
  20. package/dist/components/checkbox/index.d.ts +2 -2
  21. package/dist/components/checkbox/index.js +1 -1
  22. package/dist/components/checkbox/index.js.map +1 -1
  23. package/dist/components/chip/index.d.ts +25 -48
  24. package/dist/components/chip/index.js +1 -1
  25. package/dist/components/chip/index.js.map +1 -1
  26. package/dist/components/chip/styles.d.ts +250 -0
  27. package/dist/components/chip/styles.js +2 -0
  28. package/dist/components/chip/styles.js.map +1 -0
  29. package/dist/components/chip/types.d.ts +20 -0
  30. package/dist/components/chip/types.js +2 -0
  31. package/dist/components/chip/types.js.map +1 -0
  32. package/dist/components/classification-badge/index.d.ts +15 -16
  33. package/dist/components/classification-badge/index.js +1 -1
  34. package/dist/components/classification-badge/index.js.map +1 -1
  35. package/dist/components/classification-badge/styles.d.ts +51 -0
  36. package/dist/components/classification-badge/styles.js +2 -0
  37. package/dist/components/classification-badge/styles.js.map +1 -0
  38. package/dist/components/classification-badge/types.d.ts +9 -0
  39. package/dist/components/classification-badge/types.js +2 -0
  40. package/dist/components/classification-badge/types.js.map +1 -0
  41. package/dist/components/classification-banner/index.d.ts +15 -16
  42. package/dist/components/classification-banner/index.js +1 -2
  43. package/dist/components/classification-banner/index.js.map +1 -1
  44. package/dist/components/classification-banner/styles.d.ts +38 -0
  45. package/dist/components/classification-banner/styles.js +2 -0
  46. package/dist/components/classification-banner/styles.js.map +1 -0
  47. package/dist/components/classification-banner/types.d.ts +9 -0
  48. package/dist/components/classification-banner/types.js +2 -0
  49. package/dist/components/classification-banner/types.js.map +1 -0
  50. package/dist/components/combobox/index.js +1 -1
  51. package/dist/components/combobox/index.js.map +1 -1
  52. package/dist/components/date-field/index.js +1 -1
  53. package/dist/components/date-field/index.js.map +1 -1
  54. package/dist/components/dialog/index.d.ts +5 -5
  55. package/dist/components/dialog/index.js +1 -1
  56. package/dist/components/dialog/index.js.map +1 -1
  57. package/dist/components/icon/index.d.ts +2 -2
  58. package/dist/components/icon/types.d.ts +3 -5
  59. package/dist/components/label/index.d.ts +10 -7
  60. package/dist/components/label/index.js +1 -1
  61. package/dist/components/label/index.js.map +1 -1
  62. package/dist/components/label/styles.d.ts +5 -0
  63. package/dist/components/label/styles.js +2 -0
  64. package/dist/components/label/styles.js.map +1 -0
  65. package/dist/components/label/types.d.ts +10 -0
  66. package/dist/components/label/types.js +2 -0
  67. package/dist/components/label/types.js.map +1 -0
  68. package/dist/components/options/index.d.ts +2 -2
  69. package/dist/components/options-item/index.js +1 -1
  70. package/dist/components/options-item/index.js.map +1 -1
  71. package/dist/components/popover/styles.d.ts +3 -3
  72. package/dist/components/query-builder/index.js +1 -1
  73. package/dist/components/query-builder/index.js.map +1 -1
  74. package/dist/components/query-builder/value-editor.js +1 -1
  75. package/dist/components/query-builder/value-editor.js.map +1 -1
  76. package/dist/components/radio/index.d.ts +11 -9
  77. package/dist/components/radio/index.js +1 -1
  78. package/dist/components/radio/index.js.map +1 -1
  79. package/dist/components/radio/styles.d.ts +53 -0
  80. package/dist/components/radio/styles.js +2 -0
  81. package/dist/components/radio/styles.js.map +1 -0
  82. package/dist/components/radio/types.d.ts +21 -0
  83. package/dist/components/radio/types.js +2 -0
  84. package/dist/components/radio/types.js.map +1 -0
  85. package/dist/components/search-field/index.js +1 -1
  86. package/dist/components/search-field/index.js.map +1 -1
  87. package/dist/components/switch/index.d.ts +10 -7
  88. package/dist/components/switch/index.js +1 -1
  89. package/dist/components/switch/index.js.map +1 -1
  90. package/dist/components/switch/styles.d.ts +41 -0
  91. package/dist/components/switch/styles.js +2 -0
  92. package/dist/components/switch/styles.js.map +1 -0
  93. package/dist/components/switch/types.d.ts +13 -0
  94. package/dist/components/switch/types.js +2 -0
  95. package/dist/components/switch/types.js.map +1 -0
  96. package/dist/components/tabs/index.js +1 -1
  97. package/dist/components/tabs/index.js.map +1 -1
  98. package/dist/components/text-area-field/index.d.ts +19 -0
  99. package/dist/components/text-area-field/index.js +2 -0
  100. package/dist/components/text-area-field/index.js.map +1 -0
  101. package/dist/components/text-area-field/styles.d.ts +113 -0
  102. package/dist/components/text-area-field/styles.js +2 -0
  103. package/dist/components/text-area-field/styles.js.map +1 -0
  104. package/dist/components/text-area-field/types.d.ts +23 -0
  105. package/dist/components/text-area-field/types.js +2 -0
  106. package/dist/components/text-area-field/types.js.map +1 -0
  107. package/dist/components/text-field/index.js +1 -1
  108. package/dist/components/text-field/index.js.map +1 -1
  109. package/dist/components/tooltip/index.d.ts +2 -2
  110. package/dist/index.css +122 -252
  111. package/dist/index.d.ts +25 -11
  112. package/dist/index.js +1 -1
  113. package/dist/lib/react.js.map +1 -1
  114. package/dist/lib/utils.js +1 -1
  115. package/dist/lib/utils.js.map +1 -1
  116. package/dist/metafile-esm.json +1 -1
  117. package/dist/styles.css +873 -754
  118. package/dist/tokens/generated/themes.css +147 -0
  119. package/dist/tokens/generated/themes.d.ts +2 -0
  120. package/dist/tokens/generated/tokens.css +119 -0
  121. package/dist/tokens/generated/tokens.d.ts +108 -0
  122. package/dist/tokens/generated/tokens.js +2 -0
  123. package/dist/tokens/generated/tokens.js.map +1 -0
  124. package/package.json +5 -5
  125. package/dist/components/floating-button/index.d.ts +0 -18
  126. package/dist/components/floating-button/index.js +0 -2
  127. package/dist/components/floating-button/index.js.map +0 -1
  128. package/dist/components/icon-button/index.d.ts +0 -20
  129. package/dist/components/icon-button/index.js +0 -2
  130. package/dist/components/icon-button/index.js.map +0 -1
  131. package/dist/components/text-area/index.d.ts +0 -30
  132. package/dist/components/text-area/index.js +0 -2
  133. package/dist/components/text-area/index.js.map +0 -1
  134. package/dist/components/toggle-icon-button/index.d.ts +0 -20
  135. package/dist/components/toggle-icon-button/index.js +0 -2
  136. package/dist/components/toggle-icon-button/index.js.map +0 -1
package/dist/index.css CHANGED
@@ -14,330 +14,200 @@
14
14
  @import '@fontsource/roboto-flex';
15
15
  @import '@fontsource/roboto-mono';
16
16
  @import 'tailwindcss';
17
- @plugin 'tailwindcss-react-aria-components' {
18
- prefix: 'dtk'
19
- }
20
- @source './components/foundation';
21
-
22
- :root {
23
- --neutral-01: #ffffff;
24
- --neutral-02: #e6e6e6;
25
- --neutral-03: #898989;
26
- --neutral-04: #686868;
27
- --neutral-05: #565656;
28
- --neutral-06: #424242;
29
- --neutral-07: #383838;
30
- --neutral-08: #2f2f31;
31
- --neutral-09: #222222;
32
- --neutral-10: #0b0b0b;
33
-
34
- --neutral-11: #FF0000;
35
-
36
- --alpha-black-01: rgba(0, 0, 0, 0.08);
37
- --alpha-black-02: rgba(0, 0, 0, 0.4);
38
- --alpha-black-03: rgba(0, 0, 0, 0.8);
39
-
40
- --alpha-white-01: rgba(255, 255, 255, 0.08);
41
- --alpha-white-02: rgba(255, 255, 255, 0.4);
42
- --alpha-white-03: rgba(255, 255, 255, 0.8);
43
-
44
- --highlight-primary-01: #c9fdef;
45
- --highlight-primary-02: #7df9d8;
46
- --highlight-primary-03: #28f5be;
47
- --highlight-primary-04: #189372;
48
- --highlight-primary-05: #0a3d30;
49
-
50
- --highlight-secondary-01: #c9f6fd;
51
- --highlight-secondary-02: #7ee9f9;
52
- --highlight-secondary-03: #28dcf5;
53
- --highlight-secondary-04: #188493;
54
- --highlight-secondary-05: #0a373d;
55
-
56
- --highlight-tertiary-01: #f9c5e2;
57
- --highlight-tertiary-02: #f174b9;
58
- --highlight-tertiary-03: #e8178a;
59
- --highlight-tertiary-04: #8a0e53;
60
- --highlight-tertiary-05: #3a0623;
61
-
62
- --utility-info-01: #e6e6e6;
63
- --utility-info-02: #898989;
64
- --utility-info-03: #686868;
65
- --utility-info-04: #424244;
66
- --utility-info-05: #222222;
67
-
68
- --utility-advisory-01: #e0edff;
69
- --utility-advisory-02: #a1caff;
70
- --utility-advisory-03: #62a6ff;
71
- --utility-advisory-04: #3a6499;
72
- --utility-advisory-05: #142133;
73
-
74
- --utility-normal-01: #d6f6e5;
75
- --utility-normal-02: #82e4b2;
76
- --utility-normal-03: #30d27e;
77
- --utility-normal-04: #1c7e4c;
78
- --utility-normal-05: #0a2a19;
79
-
80
- --utility-serious-01: #feedcc;
81
- --utility-serious-02: #fdc865;
82
- --utility-serious-03: #fca400;
83
- --utility-serious-04: #976201;
84
- --utility-serious-05: #322100;
85
-
86
- --utility-critical-01: #f6d3d2;
87
- --utility-critical-02: #e57b77;
88
- --utility-critical-03: #d4231d;
89
- --utility-critical-04: #7f1511;
90
- --utility-critical-05: #2a0706;
91
-
92
- --classification-unclass: #007A33;
93
- --classification-cui: #502b85;
94
- --classification-confidential: #0033a0;
95
- --classification-secret: #c8102e;
96
- --classification-top-secret: #ff8c00;
97
- --classification-ts-sci: #fce83a;
98
-
99
- --header-xxl-size: 32px;
100
- --header-xxl-height: 40px;
101
- --header-xl-size: 24px;
102
- --header-xl-height: 28px;
103
- --header-l-size: 20px;
104
- --header-l-height: 24px;
105
- --header-m-size: 14px;
106
- --header-m-height: 20px;
107
- --header-s-size: 12px;
108
- --header-s-height: 16px;
109
- --header-xs-size: 10px;
110
- --header-xs-height: 12px;
111
-
112
- --body-l-size: 16px;
113
- --body-l-height: 24px;
114
- --body-m-size: 14px;
115
- --body-m-height: 20px;
116
- --body-s-size: 12px;
117
- --body-s-height: 16px;
118
- --body-xs-size: 10px;
119
- --body-xs-height: 12px;
120
- --body-xxs-size: 9px;
121
- --body-xxs-height: 12px;
122
-
123
- --button-l-size: 16px;
124
- --button-l-height: 24px;
125
- --button-m-size: 14px;
126
- --button-m-height: 20px;
127
- --button-s-size: 12px;
128
- --button-s-height: 16px;
129
- --button-xs-size: 10px;
130
- --button-xs-height: 12px;
131
- }
17
+
18
+ /* Import generated themes.css */
19
+ @import './tokens/generated/themes.css';
132
20
 
133
21
  @theme {
134
- /* Remove the default Tailwind styles. */
135
- --color-*: initial;
136
- --font-*: initial;
137
- --radius-*: initial;
138
- --shadow-*: initial;
139
- --spacing-*: initial;
140
- --text-*: initial;
141
-
142
- /** Fonts **/
143
- --font-primary: "Roboto Flex", sans-serif;
144
- --font-display: "Roboto Mono", monospace;
145
-
146
- /** Colors **/
147
22
  --color-current: currentColor;
148
- --color-surface-default: var(--neutral-10, #0b0b0b);
149
- --color-surface-raised: var(--neutral-09, #222222);
150
- --color-surface-overlay: var(--neutral-08, #2f2f31);
151
- --color-transparent-dark: var(--alpha-black-02, rgba(0, 0, 0, 0.4));
152
- --color-transparent-light: var(--alpha-white-01, rgba(255, 255, 255, 0.08));
153
-
154
- --color-interactive-default: var(--neutral-02, #e6e6e6);
155
- --color-interactive-hover-light: var(--neutral-03, #898989);
156
- --color-interactive-hover-dark: var(--neutral-08, #2f2f31);
157
- --color-interactive-disabled: var(--neutral-07, #383838);
158
-
159
- --color-static-light: var(--neutral-07, #383838);
160
- --color-static-dark: var(--neutral-09, #222222);
161
- --color-interactive: var(--neutral-05, #565656);
162
- --color-interactive-hover: var(--neutral-01, #ffffff);
163
-
164
- --color-highlight-bold: var(--highlight-primary-03, #28f5be);
165
- --color-highlight-hover: var(--highlight-primary-04, #189372);
166
- --color-highlight-subtle: var(--highlight-primary-05, #0a3d30);
167
- --color-info-bold: var(--utility-info-03, #686868);
168
- --color-info-hover: var(--utility-info-04, #424244);
169
- --color-info-subtle: var(--utility-info-05, #222222);
170
- --color-advisory-bold: var(--utility-advisory-03, #62a6ff);
171
- --color-advisory-hover: var(--utility-advisory-04, #3a6499);
172
- --color-advisory-subtle: var(--utility-advisory-05, #142133);
173
- --color-normal-bold: var(--utility-normal-03, #30d27e);
174
- --color-normal-hover: var(--utility-normal-04, #1c7e4c);
175
- --color-normal-subtle: var(--utility-normal-05, #0a2a19);
176
- --color-serious-bold: var(--utility-serious-03, #fca400);
177
- --color-serious-hover: var(--utility-serious-04, #976201);
178
- --color-serious-subtle: var(--utility-serious-05, #322100);
179
- --color-critical-bold: var(--utility-critical-03, #d4231d);
180
- --color-critical-hover: var(--utility-critical-04, #7f1511);
181
- --color-critical-subtle: var(--utility-critical-05, #2a0706);
182
-
183
- --color-default-light: var(--neutral-01, #ffffff);
184
- --color-default-dark: var(--neutral-03, #898989);
185
- --color-inverse-dark: var(--neutral-07,#383838);
186
- --color-inverse-light: var(--neutral-09, #222222);
187
- --color-disabled: var(--neutral-05, #565656);
188
- --color-highlight: var(--highlight-primary-03, #28f5be);
189
- --color-info: var(--neutral-04, #686868);
190
- --color-advisory: var(--utility-advisory-03, #62a6ff);
191
- --color-normal: var(--utility-normal-03, #30d27e);
192
- --color-serious: var(--utility-serious-03, #fca400);
193
- --color-critical: var(--utility-critical-03, #d4231d);
194
-
195
- --color-classification-missing: var(--neutral-10, #0b0b0b);
196
- --color-classification-unclass: var(--classification-unclass, #007A33);
197
- --color-classification-cui: var(--classification-cui, #502b85);
198
- --color-classification-confidential: var(--classification-confidential, #0033a0);
199
- --color-classification-secret: var(--classification-secret, #c8102e);
200
- --color-classification-top-secret: var(--classification-top-secret, #ff8c00);
201
- --color-classification-ts-sci: var(--classification-ts-sci, #fce83a);
202
-
203
- /** Radius **/
204
- --radius-none: 0px;
205
- --radius-small: 2px;
206
- --radius-medium: 4px;
207
- --radius-large: 8px;
208
- --radius-round: 80px;
209
-
210
- /** Shadows **/
211
- --shadow-elevation-default: initial;
212
- --shadow-elevation-overlay:
213
- 0 8px 10px 0 rgba(0 0 0 / 0.2), 0 6px 30px 0 rgba(0 0 0 / 0.12),
214
- 0 16px 24px 0 rgba(0 0 0 / 0.14);
215
- --shadow-elevation-raised:
216
- 0 5px 5px 0 rgba(0 0 0 / 0.2), 0 3px 14px 0 rgba(0 0 0 / 0.12),
217
- 0 8px 10px 0 rgba(0 0 0 / 0.14);
218
-
219
- /** Spacing **/
220
- --spacing-none: unset;
221
- --spacing-0: 0;
222
- --spacing-xxs: 2px;
223
- --spacing-xs: 4px;
224
- --spacing-s: 8px;
225
- --spacing-m: 12px;
226
- --spacing-l: 16px;
227
- --spacing-xl: 24px;
228
- --spacing-xxl: 40px;
229
- --spacing-oversized: 80px;
230
-
231
- --icon-size-l: var(--spacing-xl);
232
- --icon-size-m: 20px;
233
- --icon-size-s: var(--spacing-l);
234
- --icon-size-xs: var(--spacing-m);
235
23
  }
236
24
 
25
+ /** Recreating https://github.com/adobe/react-spectrum/blob/main/packages/tailwindcss-react-aria-components/src/index.js without RAC selectors (:where([data-rac])) or prefix and combining with native selectors **/
26
+ @custom-variant placement-left { &[data-placement="left"] { @slot }}
27
+ @custom-variant placement-right { &[data-placement="right"] { @slot }}
28
+ @custom-variant placement-top { &[data-placement="top"] { @slot }}
29
+ @custom-variant placement-bottom { &[data-placement="bottom"] { @slot }}
30
+
31
+ @custom-variant type-literal { &[data-type="literal"] { @slot }}
32
+ @custom-variant type-year { &[data-type="year"] { @slot }}
33
+ @custom-variant type-month { &[data-type="month"] { @slot }}
34
+ @custom-variant type-day { &[data-type="day"] { @slot }}
35
+
36
+ @custom-variant layout-grid { &[data-layout="grid"] { @slot }}
37
+ @custom-variant layout-stack { &[data-layout="stack"] { @slot }}
38
+
39
+ @custom-variant orientation-horizontal { &[data-orientation="horizontal"] { @slot }}
40
+ @custom-variant orientation-vertical { &[data-orientation="vertical"] { @slot }}
41
+
42
+ @custom-variant selection-single { &[data-selection-mode="single"] { @slot }}
43
+ @custom-variant selection-multiple { &[data-selection-mode="multiple"] { @slot }}
44
+
45
+ @custom-variant resizable-right { &[data-resizable-direction="right"] { @slot }}
46
+ @custom-variant resizable-left { &[data-resizable-direction="left"] { @slot }}
47
+ @custom-variant resizable-both { &[data-resizable-direction="both"] { @slot }}
48
+
49
+ @custom-variant sort-ascending { &[data-sort-direction="ascending"] { @slot }}
50
+ @custom-variant sort-descending { &[data-sort-direction="descending"] { @slot }}
51
+
52
+ @custom-variant allows-removing { &[data-allows-removing] { @slot }}
53
+ @custom-variant allows-sorting { &[data-allows-sorting] { @slot }}
54
+ @custom-variant allows-dragging { &[data-allows-dragging] { @slot }}
55
+
56
+ @custom-variant has-submenu { &[data-has-submenu] { @slot }}
57
+ @custom-variant has-child-items { &[data-has-child-items] { @slot }}
58
+
59
+ @custom-variant open { &:is([open], [data-open]), &:open { @slot }}
60
+ @custom-variant expanded { &:is([expanded], [data-expanded]) { @slot }}
61
+
62
+ @custom-variant entering { &[data-entering] { @slot }}
63
+ @custom-variant exiting { &[data-exiting] { @slot }}
64
+
65
+ @custom-variant indeterminate { &[data-indeterminate], &:indeterminate { @slot }}
66
+
67
+ @custom-variant placeholder-shown { &[data-placeholder], &:placeholder-shown { @slot }}
68
+
69
+ @custom-variant current { &[data-current] { @slot }}
70
+
71
+ @custom-variant optional { &:not([required], [data-required]), &:optional { @slot }}
72
+ @custom-variant required { &:is([required], [data-required]), &:required { @slot }}
73
+
74
+ @custom-variant unavailable { &[data-unavailable] { @slot }}
75
+
76
+ @custom-variant invalid { &:is([invalid], [data-invalid]), &:invalid { @slot }}
77
+
78
+ @custom-variant read-only { &:is([readonly], [data-readonly]), &:read-only { @slot }}
79
+
80
+ @custom-variant outside-month { &[data-outside-month] { @slot }}
81
+ @custom-variant outside-visible-range { &[data-outside-visible-range] { @slot }}
82
+
83
+ @custom-variant pending { &[data-pending] { @slot }}
84
+
85
+ @custom-variant empty { &[data-empty], &:empty { @slot }}
86
+
87
+ @custom-variant focus-within { &[data-focus-within], &:focus-within { @slot }}
88
+
89
+ @custom-variant hover { &[data-hovered], &:hover { @slot }}
90
+
91
+ @custom-variant focus { &[data-focused], &:focus { @slot }}
92
+ @custom-variant focus-visible { &[data-focus-visible], &:focus-visible { @slot }}
93
+
94
+ @custom-variant pressed { &[data-pressed], &:active { @slot }}
95
+
96
+ @custom-variant selected { &[data-selected] { @slot }}
97
+ @custom-variant selection-start { &[data-selection-start] { @slot }}
98
+ @custom-variant selection-end { &[data-selection-end] { @slot }}
99
+
100
+ @custom-variant dragging { &[data-dragging] { @slot }}
101
+ @custom-variant drop-target { &[data-drop-target] { @slot }}
102
+
103
+ @custom-variant resizing { &[data-resizing] { @slot }}
104
+
105
+ @custom-variant enabled { &:not([disabled], [data-disabled]), &:enabled { @slot }}
106
+ @custom-variant disabled { &:is([disabled], [data-disabled]), &:disabled { @slot }}
107
+
237
108
  @utility text-header-xxl {
238
- font-size: var(--header-xxl-size);
109
+ font-size: var(--typography-header-xxl-size);
239
110
  font-weight: 500;
240
111
  letter-spacing: 0px;
241
- line-height: var(--header-xxl-height);
112
+ line-height: var(--typography-header-xxl-height);
242
113
  }
243
114
 
244
115
  @utility text-header-xl {
245
- font-size: var(--header-xl-size);
116
+ font-size: var(--typography-header-xl-size);
246
117
  font-weight: 500;
247
118
  letter-spacing: 0.18px;
248
- line-height: var(--header-xl-height);
119
+ line-height: var(--typography-header-xl-height);
249
120
  }
250
121
 
251
122
  @utility text-header-l {
252
- font-size: var(--header-l-size);
123
+ font-size: var(--typography-header-l-size);
253
124
  font-weight: 500;
254
125
  letter-spacing: 0.18px;
255
- line-height: var(--header-l-height);
126
+ line-height: var(--typography-header-l-height);
256
127
  }
257
128
 
258
129
  @utility text-header-m {
259
- font-size: var(--header-m-size);
130
+ font-size: var(--typography-header-m-size);
260
131
  font-weight: 500;
261
132
  letter-spacing: 0.25px;
262
- line-height: var(--header-m-height);
133
+ line-height: var(--typography-header-m-height);
263
134
  }
264
135
 
265
136
  @utility text-header-s {
266
- font-size: var(--header-s-size);
137
+ font-size: var(--typography-header-s-size);
267
138
  font-weight: 500;
268
139
  letter-spacing: 0.4px;
269
- line-height: var(--header-s-height);
140
+ line-height: var(--typography-header-s-height);
270
141
  }
271
142
 
272
143
  @utility text-header-xs {
273
- font-size: var(--header-xs-size);
144
+ font-size: var(--typography-header-xs-size);
274
145
  font-weight: 500;
275
146
  letter-spacing: 0.25px;
276
- line-height: var(--header-xs-height);
147
+ line-height: var(--typography-header-xs-height);
277
148
  }
278
149
 
279
-
280
150
  @utility text-body-l {
281
- font-size: var(--body-l-size);
151
+ font-size: var(--typography-body-l-size);
282
152
  font-weight: 400;
283
153
  letter-spacing: 0.5px;
284
- line-height: var(--body-l-height);
154
+ line-height: var(--typography-body-l-height);
285
155
  }
286
156
 
287
157
  @utility text-body-m {
288
- font-size: var(--body-m-size);
158
+ font-size: var(--typography-body-m-size);
289
159
  font-weight: 400;
290
160
  letter-spacing: 0.25px;
291
- line-height: var(--body-m-height);
161
+ line-height: var(--typography-body-m-height);
292
162
  }
293
163
 
294
164
  @utility text-body-s {
295
- font-size: var(--body-s-size);
165
+ font-size: var(--typography-body-s-size);
296
166
  font-weight: 400;
297
167
  letter-spacing: 0.4px;
298
- line-height: var(--body-s-height);
168
+ line-height: var(--typography-body-s-height);
299
169
  }
300
170
 
301
171
  @utility text-body-xs {
302
- font-size: var(--body-xs-size);
172
+ font-size: var(--typography-body-xs-size);
303
173
  font-weight: 400;
304
174
  letter-spacing: 0.5px;
305
- line-height: var(--body-xs-height);
175
+ line-height: var(--typography-body-xs-height);
306
176
  }
307
177
 
308
178
  @utility text-body-xxs {
309
- font-size: var(--body-xxs-size);
179
+ font-size: var(--typography-body-xxs-size);
310
180
  font-weight: 400;
311
181
  letter-spacing: 0.25px;
312
- line-height: var(--body-xxs-height);
182
+ line-height: var(--typography-body-xxs-height);
313
183
  }
314
184
 
315
185
  @utility text-button-l {
316
- font-size: var(--button-l-size);
186
+ font-size: var(--typography-button-l-size);
317
187
  font-weight: bold;
318
188
  letter-spacing: 0.5px;
319
- line-height: var(--button-l-height);
189
+ line-height: var(--typography-button-l-height);
320
190
  }
321
191
 
322
192
  @utility text-button-m {
323
- font-size: var(--button-m-size);
193
+ font-size: var(--typography-button-m-size);
324
194
  font-weight: bold;
325
195
  letter-spacing: 0.25px;
326
- line-height: var(--button-m-height);
196
+ line-height: var(--typography-button-m-height);
327
197
  }
328
198
 
329
199
  @utility text-button-s {
330
- font-size: var(--button-s-size);
200
+ font-size: var(--typography-button-s-size);
331
201
  font-weight: bold;
332
202
  letter-spacing: 0.4px;
333
- line-height: var(--button-s-height);
203
+ line-height: var(--typography-button-s-height);
334
204
  }
335
205
 
336
206
  @utility text-button-xs {
337
- font-size: var(--button-xs-size);
207
+ font-size: var(--typography-button-xs-size);
338
208
  font-weight: bold;
339
209
  letter-spacing: 0.5px;
340
- line-height: var(--button-xs-height);
210
+ line-height: var(--typography-button-xs-height);
341
211
  }
342
212
 
343
213
  @utility w-content {
@@ -384,8 +254,8 @@ body {
384
254
  bottom: 0;
385
255
  left: 50%;
386
256
  background-image:
387
- repeating-linear-gradient(to bottom, var(--neutral-04), var(--neutral-04)),
388
- repeating-linear-gradient(to right, var(--neutral-04), var(--neutral-04));
257
+ repeating-linear-gradient(to bottom, var(--colors-neutral-04), var(--colors-neutral-04)),
258
+ repeating-linear-gradient(to right, var(--colors-neutral-04), var(--colors-neutral-04));
389
259
  background-position: left -1px, center;
390
260
  background-repeat: repeat-y, repeat-x;
391
261
  background-size: 1px 4px, 4px 1px;
@@ -399,8 +269,8 @@ body {
399
269
  bottom: 50%;
400
270
  left: 50%;
401
271
  background-image:
402
- repeating-linear-gradient(to bottom,var(--neutral-04), var(--neutral-04)),
403
- repeating-linear-gradient(to right, var(--neutral-04), var(--neutral-04));
272
+ repeating-linear-gradient(to bottom,var(--colors-neutral-04), var(--colors-neutral-04)),
273
+ repeating-linear-gradient(to right, var(--colors-neutral-04), var(--colors-neutral-04));
404
274
  background-position: left -1px, bottom;
405
275
  background-repeat: repeat-y, repeat-x;
406
276
  background-size: 1px 4px, 4px 1px;
@@ -414,8 +284,8 @@ body {
414
284
  bottom: 0;
415
285
  left: 50%;
416
286
  background-image:
417
- repeating-linear-gradient(to bottom, var(--neutral-04), var(--neutral-04)),
418
- repeating-linear-gradient(to right, var(--neutral-04), var(--neutral-04));
287
+ repeating-linear-gradient(to bottom, var(--colors-neutral-04), var(--colors-neutral-04)),
288
+ repeating-linear-gradient(to right, var(--colors-neutral-04), var(--colors-neutral-04));
419
289
  background-position: left -1px, center;
420
290
  background-repeat: repeat-y, repeat-x;
421
291
  background-size: 1px 4px, 4px 1px;
package/dist/index.d.ts CHANGED
@@ -4,39 +4,53 @@ export { AccordionGroupProps, AccordionHeaderProps, AccordionPanelProps, Accordi
4
4
  export { Avatar, AvatarProps } from './components/avatar/index.js';
5
5
  export { Badge, BadgeProps } from './components/badge/index.js';
6
6
  export { Box, BoxProps } from './components/box/index.js';
7
- export { Button, ButtonProps } from './components/button/index.js';
7
+ export { Button, ButtonContext, LinkButton, LinkButtonContext, ToggleButton, ToggleButtonContext } from './components/button/index.js';
8
+ export { ButtonStyles, ButtonStylesDefaults, LinkButtonStyles, ToggleButtonStyles } from './components/button/styles.js';
9
+ export { ButtonProps, ButtonProviderProps, ButtonStyleVariants, LinkButtonProps, LinkButtonProviderProps, ToggleButtonProps, ToggleButtonProviderProps } from './components/button/types.js';
8
10
  export { Checkbox, CheckboxGroupProps, CheckboxProps } from './components/checkbox/index.js';
9
- export { Chip, ChipListProps, ChipProps, DeletableChip, SelectableChip } from './components/chip/index.js';
10
- export { ClassificationBadge, ClassificationBadgeProps } from './components/classification-badge/index.js';
11
- export { ClassificationBanner, ClassificationBannerProps } from './components/classification-banner/index.js';
11
+ export { Chip, ChipContext } from './components/chip/index.js';
12
+ export { BaseChipStyles, ChipStyles, ChipStylesDefaults, DeletableChipStyles, SelectableChipStyles } from './components/chip/styles.js';
13
+ export { BaseChipProps, ChipListProps, ChipProps, ChipProviderProps, DeletableChipProps, SelectableChipProps } from './components/chip/types.js';
14
+ export { ClassificationBadge, ClassificationBadgeContext } from './components/classification-badge/index.js';
15
+ export { ClassificationBadgeStyles, ClassificationBadgeStylesDefaults } from './components/classification-badge/styles.js';
16
+ export { ClassificationBadgeProps, ClassificationBadgeProviderProps, ClassificationBadgeStyleVariants } from './components/classification-badge/types.js';
17
+ export { ClassificationBanner, ClassificationBannerContext } from './components/classification-banner/index.js';
18
+ export { ClassificationBannerStyles, ClassificationBannerStylesDefaults } from './components/classification-banner/styles.js';
19
+ export { ClassificationBannerProps, ClassificationBannerProviderProps, ClassificationBannerStyleVariants } from './components/classification-banner/types.js';
12
20
  export { ColorPicker, ColorPickerProps, useColorPickerState } from './components/color-picker/index.js';
13
21
  export { ComboBox, ComboBoxProps, ComboBoxSection } from './components/combobox/index.js';
14
22
  export { DateField, DateFieldProps } from './components/date-field/index.js';
15
23
  export { Dialog, DialogProps, DialogTitle } from './components/dialog/index.js';
16
- export { FloatingButton, FloatingButtonProps } from './components/floating-button/index.js';
17
24
  export { Icon, IconContext } from './components/icon/index.js';
18
25
  export { IconStyleVariants, IconStyles, IconStylesDefaults } from './components/icon/styles.js';
19
26
  export { IconProps, IconProviderProps } from './components/icon/types.js';
20
- export { IconButton, IconButtonProps } from './components/icon-button/index.js';
21
- export { Label } from './components/label/index.js';
27
+ export { Label, LabelContext } from './components/label/index.js';
28
+ export { LabelStyles } from './components/label/styles.js';
29
+ export { LabelProps, LabelProviderProps } from './components/label/types.js';
22
30
  export { Options, OptionsContext, OptionsProps, OptionsSection } from './components/options/index.js';
23
31
  export { IOptionsItem, OptionsItem, OptionsItemProps } from './components/options-item/index.js';
24
32
  export { Popover, PopoverTrigger } from './components/popover/index.js';
25
33
  export { PopoverStyles } from './components/popover/styles.js';
26
34
  export { PopoverBodyProps, PopoverContentProps, PopoverProps, PopoverTitleProps, PopoverTriggerProps } from './components/popover/types.js';
27
35
  export { ClassNames, DefaultRQBProps, Field, QueryBuilder, QueryBuilderContextType, QueryBuilderProps, QueryBuilderValueEditors, RuleGroupType } from './components/query-builder/index.js';
28
- export { Radio, RadioGroupProps, RadioProps } from './components/radio/index.js';
36
+ export { Radio, RadioContext } from './components/radio/index.js';
37
+ export { RadioStyles } from './components/radio/styles.js';
38
+ export { RadioGroupProps, RadioProps, RadioProviderProps } from './components/radio/types.js';
29
39
  export { SearchField, SearchFieldProps } from './components/search-field/index.js';
30
40
  export { RangeSlider, RangeSliderProps, Slider, SliderProps } from './components/slider/index.js';
31
- export { Switch, SwitchProps } from './components/switch/index.js';
41
+ export { Switch, SwitchContext } from './components/switch/index.js';
42
+ export { SwitchStyles } from './components/switch/styles.js';
43
+ export { SwitchProps, SwitchProviderProps } from './components/switch/types.js';
32
44
  export { TabListProps, TabPanelProps, TabProps, Tabs, TabsProps } from './components/tabs/index.js';
33
- export { TextArea, TextAreaProps } from './components/text-area/index.js';
45
+ export { TextAreaField, TextAreaFieldContext } from './components/text-area-field/index.js';
46
+ export { TextAreaStyles, TextAreaStylesDefaults } from './components/text-area-field/styles.js';
47
+ export { TextAreaFieldProps, TextAreaFieldProviderProps, TextAreaStyleVariants } from './components/text-area-field/types.js';
34
48
  export { TextField, TextFieldProps } from './components/text-field/index.js';
35
- export { ToggleIconButton, ToggleIconButtonProps } from './components/toggle-icon-button/index.js';
36
49
  export { Tooltip, TooltipBody, TooltipBodyProps, TooltipProps, TooltipTrigger, TooltipTriggerProps } from './components/tooltip/index.js';
37
50
  export { containsExactChildren, expectsIconWrapper } from './lib/react.js';
38
51
  export { ChildrenRenderProps, ClassNameRenderProps, RenderProps, RenderPropsChildren, RenderPropsClassName, RenderPropsStyle, StylePropRenderProps, StyleRenderProps } from './lib/types.js';
39
52
  export { cn, isSlottedContextValue, tv, twMerge } from './lib/utils.js';
53
+ export { RGBAColor, colorAdvisory, colorAdvisoryBold, colorAdvisoryHover, colorAdvisorySubtle, colorClassificationConfidential, colorClassificationCui, colorClassificationMissing, colorClassificationSecret, colorClassificationTopSecret, colorClassificationTsSci, colorClassificationUnclass, colorCritical, colorCriticalBold, colorCriticalHover, colorCriticalSubtle, colorDefaultDark, colorDefaultLight, colorDisabled, colorHighlight, colorHighlightBold, colorHighlightHover, colorHighlightSubtle, colorInfo, colorInfoBold, colorInfoHover, colorInfoSubtle, colorInteractive, colorInteractiveDefault, colorInteractiveDisabled, colorInteractiveHover, colorInteractiveHoverDark, colorInteractiveHoverLight, colorInverseDark, colorInverseLight, colorNormal, colorNormalBold, colorNormalHover, colorNormalSubtle, colorSerious, colorSeriousBold, colorSeriousHover, colorSeriousSubtle, colorStaticDark, colorStaticLight, colorSurfaceDefault, colorSurfaceOverlay, colorSurfaceRaised, colorTransparentDark, colorTransparentLight, fontDisplay, fontPrimary, iconSizeL, iconSizeM, iconSizeS, iconSizeXs, radiusLarge, radiusMedium, radiusNone, radiusRound, radiusSmall, shadowsElevationDefault, shadowsElevationOverlay, shadowsElevationRaised, spacing0, spacingL, spacingM, spacingNone, spacingOversized, spacingS, spacingXl, spacingXs, spacingXxl, spacingXxs, typographyBodyLHeight, typographyBodyLSize, typographyBodyMHeight, typographyBodyMSize, typographyBodySHeight, typographyBodySSize, typographyBodyXsHeight, typographyBodyXsSize, typographyBodyXxsHeight, typographyBodyXxsSize, typographyButtonLHeight, typographyButtonLSize, typographyButtonMHeight, typographyButtonMSize, typographyButtonSHeight, typographyButtonSSize, typographyButtonXsHeight, typographyButtonXsSize, typographyHeaderLHeight, typographyHeaderLSize, typographyHeaderMHeight, typographyHeaderMSize, typographyHeaderSHeight, typographyHeaderSSize, typographyHeaderXlHeight, typographyHeaderXlSize, typographyHeaderXsHeight, typographyHeaderXsSize, typographyHeaderXxlHeight, typographyHeaderXxlSize } from './tokens/generated/tokens.js';
40
54
  import 'react/jsx-runtime';
41
55
  import 'react';
42
56
  import 'react-aria-components';
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{Accordion,AccordionContext}from'./components/accordion/index.js';export{AccordionStyles,AccordionStylesDefaults}from'./components/accordion/styles.js';export{Avatar}from'./components/avatar/index.js';export{Badge}from'./components/badge/index.js';export{Box}from'./components/box/index.js';export{Button}from'./components/button/index.js';export{Checkbox}from'./components/checkbox/index.js';export{Chip,DeletableChip,SelectableChip}from'./components/chip/index.js';export{ClassificationBadge}from'./components/classification-badge/index.js';export{ClassificationBanner}from'./components/classification-banner/index.js';export{ColorPicker,useColorPickerState}from'./components/color-picker/index.js';export{ComboBox,ComboBoxSection}from'./components/combobox/index.js';export{DateField}from'./components/date-field/index.js';export{Dialog,DialogTitle}from'./components/dialog/index.js';export{FloatingButton}from'./components/floating-button/index.js';export{Icon,IconContext}from'./components/icon/index.js';export{IconStyles,IconStylesDefaults}from'./components/icon/styles.js';export{IconButton}from'./components/icon-button/index.js';export{Label}from'./components/label/index.js';export{Options,OptionsContext,OptionsSection}from'./components/options/index.js';export{OptionsItem}from'./components/options-item/index.js';export{Popover,PopoverTrigger}from'./components/popover/index.js';export{PopoverStyles}from'./components/popover/styles.js';export{QueryBuilder}from'./components/query-builder/index.js';export{Radio}from'./components/radio/index.js';export{SearchField}from'./components/search-field/index.js';export{RangeSlider,Slider}from'./components/slider/index.js';export{Switch}from'./components/switch/index.js';export{Tabs}from'./components/tabs/index.js';export{TextArea}from'./components/text-area/index.js';export{TextField}from'./components/text-field/index.js';export{ToggleIconButton}from'./components/toggle-icon-button/index.js';export{Tooltip,TooltipBody,TooltipTrigger}from'./components/tooltip/index.js';export{containsExactChildren,expectsIconWrapper}from'./lib/react.js';export{cn,isSlottedContextValue,tv,twMerge}from'./lib/utils.js';//# sourceMappingURL=index.js.map
1
+ export{Accordion,AccordionContext}from'./components/accordion/index.js';export{AccordionStyles,AccordionStylesDefaults}from'./components/accordion/styles.js';export{Avatar}from'./components/avatar/index.js';export{Badge}from'./components/badge/index.js';export{Box}from'./components/box/index.js';export{Button,ButtonContext,LinkButton,LinkButtonContext,ToggleButton,ToggleButtonContext}from'./components/button/index.js';export{ButtonStyles,ButtonStylesDefaults,LinkButtonStyles,ToggleButtonStyles}from'./components/button/styles.js';export{Checkbox}from'./components/checkbox/index.js';export{Chip,ChipContext}from'./components/chip/index.js';export{BaseChipStyles,ChipStyles,ChipStylesDefaults,DeletableChipStyles,SelectableChipStyles}from'./components/chip/styles.js';export{ClassificationBadge,ClassificationBadgeContext}from'./components/classification-badge/index.js';export{ClassificationBadgeStyles,ClassificationBadgeStylesDefaults}from'./components/classification-badge/styles.js';export{ClassificationBanner,ClassificationBannerContext}from'./components/classification-banner/index.js';export{ClassificationBannerStyles,ClassificationBannerStylesDefaults}from'./components/classification-banner/styles.js';export{ColorPicker,useColorPickerState}from'./components/color-picker/index.js';export{ComboBox,ComboBoxSection}from'./components/combobox/index.js';export{DateField}from'./components/date-field/index.js';export{Dialog,DialogTitle}from'./components/dialog/index.js';export{Icon,IconContext}from'./components/icon/index.js';export{IconStyles,IconStylesDefaults}from'./components/icon/styles.js';export{Label,LabelContext}from'./components/label/index.js';export{LabelStyles}from'./components/label/styles.js';export{Options,OptionsContext,OptionsSection}from'./components/options/index.js';export{OptionsItem}from'./components/options-item/index.js';export{Popover,PopoverTrigger}from'./components/popover/index.js';export{PopoverStyles}from'./components/popover/styles.js';export{QueryBuilder}from'./components/query-builder/index.js';export{Radio,RadioContext}from'./components/radio/index.js';export{RadioStyles}from'./components/radio/styles.js';export{SearchField}from'./components/search-field/index.js';export{RangeSlider,Slider}from'./components/slider/index.js';export{Switch,SwitchContext}from'./components/switch/index.js';export{SwitchStyles}from'./components/switch/styles.js';export{Tabs}from'./components/tabs/index.js';export{TextAreaField,TextAreaFieldContext}from'./components/text-area-field/index.js';export{TextAreaStyles,TextAreaStylesDefaults}from'./components/text-area-field/styles.js';export{TextField}from'./components/text-field/index.js';export{Tooltip,TooltipBody,TooltipTrigger}from'./components/tooltip/index.js';export{containsExactChildren,expectsIconWrapper}from'./lib/react.js';export{cn,isSlottedContextValue,tv,twMerge}from'./lib/utils.js';export{colorAdvisory,colorAdvisoryBold,colorAdvisoryHover,colorAdvisorySubtle,colorClassificationConfidential,colorClassificationCui,colorClassificationMissing,colorClassificationSecret,colorClassificationTopSecret,colorClassificationTsSci,colorClassificationUnclass,colorCritical,colorCriticalBold,colorCriticalHover,colorCriticalSubtle,colorDefaultDark,colorDefaultLight,colorDisabled,colorHighlight,colorHighlightBold,colorHighlightHover,colorHighlightSubtle,colorInfo,colorInfoBold,colorInfoHover,colorInfoSubtle,colorInteractive,colorInteractiveDefault,colorInteractiveDisabled,colorInteractiveHover,colorInteractiveHoverDark,colorInteractiveHoverLight,colorInverseDark,colorInverseLight,colorNormal,colorNormalBold,colorNormalHover,colorNormalSubtle,colorSerious,colorSeriousBold,colorSeriousHover,colorSeriousSubtle,colorStaticDark,colorStaticLight,colorSurfaceDefault,colorSurfaceOverlay,colorSurfaceRaised,colorTransparentDark,colorTransparentLight,fontDisplay,fontPrimary,iconSizeL,iconSizeM,iconSizeS,iconSizeXs,radiusLarge,radiusMedium,radiusNone,radiusRound,radiusSmall,shadowsElevationDefault,shadowsElevationOverlay,shadowsElevationRaised,spacing0,spacingL,spacingM,spacingNone,spacingOversized,spacingS,spacingXl,spacingXs,spacingXxl,spacingXxs,typographyBodyLHeight,typographyBodyLSize,typographyBodyMHeight,typographyBodyMSize,typographyBodySHeight,typographyBodySSize,typographyBodyXsHeight,typographyBodyXsSize,typographyBodyXxsHeight,typographyBodyXxsSize,typographyButtonLHeight,typographyButtonLSize,typographyButtonMHeight,typographyButtonMSize,typographyButtonSHeight,typographyButtonSSize,typographyButtonXsHeight,typographyButtonXsSize,typographyHeaderLHeight,typographyHeaderLSize,typographyHeaderMHeight,typographyHeaderMSize,typographyHeaderSHeight,typographyHeaderSSize,typographyHeaderXlHeight,typographyHeaderXlSize,typographyHeaderXsHeight,typographyHeaderXsSize,typographyHeaderXxlHeight,typographyHeaderXxlSize}from'./tokens/generated/tokens.js';//# sourceMappingURL=index.js.map
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/lib/react.ts"],"names":["ComponentStructureError","message","containsExactChildren","children","componentName","restrictions","childrenComponents","Children","isValidElement","accumulationResults","acc","child","name","missingComponentsArray","excessComponentsArray","key","min","max","found","formatList","label","items","errorMessage","expectsIconWrapper"],"mappings":"4CAeA,IAAMA,CAAAA,CAAN,cAAsC,KAAM,CAC1C,WAAA,CAAYC,CAAAA,CAAS,CACnB,MAAMA,CAAO,CAAA,CACb,IAAA,CAAK,IAAA,CAAO,0BACd,CACF,CAAA,CAuBO,SAASC,EAAsB,CACpC,QAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,EACA,YAAA,CAAAC,CACF,CAAA,CAA+B,CAC7B,IAAMC,CAAAA,CAAqBC,QAAAA,CAAS,OAAA,CAAQJ,CAAQ,CAAA,CAEpD,GAAI,CAACG,CAAAA,CAAmB,MAAME,cAAc,CAAA,CAC1C,MAAM,IAAIR,CAAAA,CACR,CAAA,CAAA,EAAII,CAAa,CAAA,4BAAA,CACnB,EAGF,IAAMK,CAAAA,CAAsBH,CAAAA,CAAmB,MAAA,CAAO,CAACI,CAAAA,CAAKC,CAAAA,GAAU,CACpE,IAAMC,CAAAA,CAAOD,CAAAA,EAAO,IAAA,EAAM,WAAA,CAC1B,OAAIC,CAAAA,GACFF,CAAAA,CAAIE,CAAI,CAAA,CAAA,CAAKF,EAAIE,CAAI,CAAA,EAAK,CAAA,EAAK,CAAA,CAAA,CAE1BF,CACT,CAAA,CAAG,EAAE,EAECG,CAAAA,CAAmC,EAAC,CACpCC,CAAAA,CAAkC,EAAC,CAEzC,IAAA,GAAW,CAACC,EAAK,CAAE,GAAA,CAAAC,CAAAA,CAAK,GAAA,CAAAC,CAAI,CAAC,CAAA,GAAK,MAAA,CAAO,QAAQZ,CAAY,CAAA,CAAG,CAC9D,IAAMa,EAAQT,CAAAA,CAAoBM,CAAG,CAAA,EAAK,CAAA,CAEtCG,EAAQF,CAAAA,EACVH,CAAAA,CAAuB,IAAA,CAAK,CAAA,EAAGG,CAAAA,CAAME,CAAK,CAAA,KAAA,EAAQH,CAAG,GAAG,CAAA,CAGtDE,CAAAA,GAAQ,MAAA,EAAaC,CAAAA,CAAQD,GAC/BH,CAAAA,CAAsB,IAAA,CAAK,CAAA,EAAGI,CAAAA,CAAQD,CAAG,CAAA,KAAA,EAAQF,CAAG,CAAA,CAAA,CAAG,EAE3D,CAEA,GAAIF,CAAAA,CAAuB,MAAA,EAAUC,EAAsB,MAAA,CAAQ,CACjE,IAAMK,CAAAA,CAAa,CAACC,CAAAA,CAAeC,CAAAA,GACjCA,CAAAA,CAAM,MAAA,CAAS,IAAKD,CAAK,CAAA;AAAA,EAAA,EAAUC,CAAAA,CAAM,IAAA,CAAK,IAAI,CAAC;AAAA,CAAA,CAAO,EAAA,CAEtDC,CAAAA,CACJ,CAAA,SAAA,EAAYlB,CAAa,CAAA;AAAA,EACtBe,CAAAA,CAAW,uBAAA,CAAyBN,CAAsB,CAAC,CAAA,EAC3DM,EAAW,yBAAA,CAA2BL,CAAqB,CAAC,CAAA,CAAA,CAEjE,MAAM,IAAId,EAAwBsB,CAAAA,CAAa,IAAA,EAAM,CACvD,CACF,CAoBO,SAASC,CAAAA,CAAmB,CAAE,QAAA,CAAApB,CAAAA,CAAU,aAAA,CAAAC,CAAc,EAAG,CACnCG,QAAAA,CAAS,OAAA,CAAQJ,CAAQ,CAAA,CAEjC,GAAA,CAAKQ,GAAU,CAChC,GAAIH,cAAAA,CAAeG,CAAK,CAAA,EAElBA,CAAAA,CAAM,KAAK,IAAA,EAAM,UAAA,CAAW,KAAK,CAAA,CACnC,MAAM,IAAI,KAAA,CACR,CAAA,EAAGP,CAAa,CAAA,mDAAA,CAClB,CAGN,CAAC,EACH","file":"react.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// @ts-nocheck\nimport { Children, type ReactNode, isValidElement } from 'react';\n\nclass ComponentStructureError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ComponentStructureError';\n }\n}\n\ntype ContainsExactChildrenProps = {\n componentName: string;\n // biome-ignore lint/suspicious/noExplicitAny: aria render props include a generic type\n children:\n | ReactNode\n | ReactNode[]\n | ((\n values: any & {\n defaultChildren: ReactNode | undefined;\n },\n ) => ReactNode);\n restrictions: Record<string, { min: number; max?: number }>;\n};\n\n/**\n * Validates the intended composite component structure.\n *\n * @param children the children of the component\n * @param componentName the displayName of the component\n * @param restrictions the record of validation rules\n */\nexport function containsExactChildren({\n children,\n componentName,\n restrictions,\n}: ContainsExactChildrenProps) {\n const childrenComponents = Children.toArray(children);\n\n if (!childrenComponents.every(isValidElement)) {\n throw new ComponentStructureError(\n `<${componentName}> received invalid children.`,\n );\n }\n\n const accumulationResults = childrenComponents.reduce((acc, child) => {\n const name = child?.type?.displayName;\n if (name) {\n acc[name] = (acc[name] || 0) + 1;\n }\n return acc;\n }, {});\n\n const missingComponentsArray: string[] = [];\n const excessComponentsArray: string[] = [];\n\n for (const [key, { min, max }] of Object.entries(restrictions)) {\n const found = accumulationResults[key] ?? 0;\n\n if (found < min) {\n missingComponentsArray.push(`${min - found} of <${key}>`);\n }\n\n if (max !== undefined && found > max) {\n excessComponentsArray.push(`${found - max} of <${key}>`);\n }\n }\n\n if (missingComponentsArray.length || excessComponentsArray.length) {\n const formatList = (label: string, items: string[]) =>\n items.length ? `\\t${label}:\\n\\t\\t${items.join(', ')}\\n` : '';\n\n const errorMessage =\n `Invalid <${componentName}> structure \\n` +\n `${formatList('Missing the following', missingComponentsArray)}` +\n `${formatList('Excess of the following', excessComponentsArray)}`;\n\n throw new ComponentStructureError(errorMessage.trim());\n }\n}\n\n/**\n * I look for svgIcons exported from the @accelint/icons library\n * and ensure that they are wrapped in an Icon component in order\n * to get the classes and styles they need in context.\n *\n * Using isValidElement means we will filter out strings, boolean, etc.\n * that are valid nodes but not elements.\n *\n * @example\n * expectsIconWrapper({\n * children,\n * componentName: Button.displayName,\n * });\n *\n *\n * @param children the children of the calling component\n * @param componentName the displayName of the calling component\n */\nexport function expectsIconWrapper({ children, componentName }) {\n const childrenComponents = Children.toArray(children);\n\n childrenComponents.map((child) => {\n if (isValidElement(child)) {\n // icons should never be a direct child of the parent\n if (child.type.name?.startsWith('Svg')) {\n throw new Error(\n `${componentName} is using an icon without the required Icon wrapper`,\n );\n }\n }\n });\n}\n"]}
1
+ {"version":3,"sources":["../../src/lib/react.ts"],"names":["ComponentStructureError","message","containsExactChildren","children","componentName","restrictions","childrenComponents","Children","isValidElement","accumulationResults","acc","child","name","missingComponentsArray","excessComponentsArray","key","min","max","found","formatList","label","items","errorMessage","expectsIconWrapper"],"mappings":"4CAeA,IAAMA,CAAAA,CAAN,cAAsC,KAAM,CAC1C,WAAA,CAAYC,CAAAA,CAAS,CACnB,MAAMA,CAAO,CAAA,CACb,IAAA,CAAK,IAAA,CAAO,0BACd,CACF,CAAA,CAuBO,SAASC,EAAsB,CACpC,QAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,EACA,YAAA,CAAAC,CACF,CAAA,CAA+B,CAC7B,IAAMC,CAAAA,CAAqBC,QAAAA,CAAS,OAAA,CAAQJ,CAAQ,CAAA,CAEpD,GAAI,CAACG,CAAAA,CAAmB,MAAME,cAAc,CAAA,CAC1C,MAAM,IAAIR,CAAAA,CACR,CAAA,CAAA,EAAII,CAAa,CAAA,4BAAA,CACnB,EAGF,IAAMK,CAAAA,CAAsBH,CAAAA,CAAmB,MAAA,CAAO,CAACI,CAAAA,CAAKC,CAAAA,GAAU,CACpE,IAAMC,CAAAA,CAAOD,CAAAA,EAAO,IAAA,EAAM,WAAA,CAC1B,OAAIC,CAAAA,GACFF,CAAAA,CAAIE,CAAI,CAAA,CAAA,CAAKF,EAAIE,CAAI,CAAA,EAAK,CAAA,EAAK,CAAA,CAAA,CAE1BF,CACT,CAAA,CAAG,EAAE,EAECG,CAAAA,CAAmC,EAAC,CACpCC,CAAAA,CAAkC,EAAC,CAEzC,IAAA,GAAW,CAACC,EAAK,CAAE,GAAA,CAAAC,CAAAA,CAAK,GAAA,CAAAC,CAAI,CAAC,CAAA,GAAK,MAAA,CAAO,QAAQZ,CAAY,CAAA,CAAG,CAC9D,IAAMa,EAAQT,CAAAA,CAAoBM,CAAG,CAAA,EAAK,CAAA,CAEtCG,EAAQF,CAAAA,EACVH,CAAAA,CAAuB,IAAA,CAAK,CAAA,EAAGG,CAAAA,CAAME,CAAK,CAAA,KAAA,EAAQH,CAAG,GAAG,CAAA,CAGtDE,CAAAA,GAAQ,MAAA,EAAaC,CAAAA,CAAQD,GAC/BH,CAAAA,CAAsB,IAAA,CAAK,CAAA,EAAGI,CAAAA,CAAQD,CAAG,CAAA,KAAA,EAAQF,CAAG,CAAA,CAAA,CAAG,EAE3D,CAEA,GAAIF,CAAAA,CAAuB,MAAA,EAAUC,EAAsB,MAAA,CAAQ,CACjE,IAAMK,CAAAA,CAAa,CAACC,CAAAA,CAAeC,CAAAA,GACjCA,CAAAA,CAAM,MAAA,CAAS,IAAKD,CAAK,CAAA;AAAA,EAAA,EAAUC,CAAAA,CAAM,IAAA,CAAK,IAAI,CAAC;AAAA,CAAA,CAAO,EAAA,CAEtDC,CAAAA,CACJ,CAAA,SAAA,EAAYlB,CAAa,CAAA;AAAA,EACtBe,CAAAA,CAAW,uBAAA,CAAyBN,CAAsB,CAAC,CAAA,EAC3DM,EAAW,yBAAA,CAA2BL,CAAqB,CAAC,CAAA,CAAA,CAEjE,MAAM,IAAId,EAAwBsB,CAAAA,CAAa,IAAA,EAAM,CACvD,CACF,CAoBO,SAASC,CAAAA,CAAmB,CAAE,QAAA,CAAApB,CAAAA,CAAU,aAAA,CAAAC,CAAc,EAAG,CACnCG,QAAAA,CAAS,OAAA,CAAQJ,CAAQ,CAAA,CAEjC,GAAA,CAAKQ,GAAU,CAChC,GAAIH,cAAAA,CAAeG,CAAK,CAAA,EAElBA,CAAAA,CAAM,KAAK,IAAA,EAAM,UAAA,CAAW,KAAK,CAAA,CACnC,MAAM,IAAI,KAAA,CACR,CAAA,EAAGP,CAAa,CAAA,mDAAA,CAClB,CAGN,CAAC,EACH","file":"react.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// @ts-nocheck\nimport { Children, type ReactNode, isValidElement } from 'react';\n\nclass ComponentStructureError extends Error {\n constructor(message) {\n super(message);\n this.name = 'ComponentStructureError';\n }\n}\n\ntype ContainsExactChildrenProps = {\n componentName: string;\n children:\n | ReactNode\n | ReactNode[]\n | ((\n // biome-ignore lint/suspicious/noExplicitAny: aria render props include a generic type\n values: any & {\n defaultChildren: ReactNode | undefined;\n },\n ) => ReactNode);\n restrictions: Record<string, { min: number; max?: number }>;\n};\n\n/**\n * Validates the intended composite component structure.\n *\n * @param children the children of the component\n * @param componentName the displayName of the component\n * @param restrictions the record of validation rules\n */\nexport function containsExactChildren({\n children,\n componentName,\n restrictions,\n}: ContainsExactChildrenProps) {\n const childrenComponents = Children.toArray(children);\n\n if (!childrenComponents.every(isValidElement)) {\n throw new ComponentStructureError(\n `<${componentName}> received invalid children.`,\n );\n }\n\n const accumulationResults = childrenComponents.reduce((acc, child) => {\n const name = child?.type?.displayName;\n if (name) {\n acc[name] = (acc[name] || 0) + 1;\n }\n return acc;\n }, {});\n\n const missingComponentsArray: string[] = [];\n const excessComponentsArray: string[] = [];\n\n for (const [key, { min, max }] of Object.entries(restrictions)) {\n const found = accumulationResults[key] ?? 0;\n\n if (found < min) {\n missingComponentsArray.push(`${min - found} of <${key}>`);\n }\n\n if (max !== undefined && found > max) {\n excessComponentsArray.push(`${found - max} of <${key}>`);\n }\n }\n\n if (missingComponentsArray.length || excessComponentsArray.length) {\n const formatList = (label: string, items: string[]) =>\n items.length ? `\\t${label}:\\n\\t\\t${items.join(', ')}\\n` : '';\n\n const errorMessage =\n `Invalid <${componentName}> structure \\n` +\n `${formatList('Missing the following', missingComponentsArray)}` +\n `${formatList('Excess of the following', excessComponentsArray)}`;\n\n throw new ComponentStructureError(errorMessage.trim());\n }\n}\n\n/**\n * I look for svgIcons exported from the @accelint/icons library\n * and ensure that they are wrapped in an Icon component in order\n * to get the classes and styles they need in context.\n *\n * Using isValidElement means we will filter out strings, boolean, etc.\n * that are valid nodes but not elements.\n *\n * @example\n * expectsIconWrapper({\n * children,\n * componentName: Button.displayName,\n * });\n *\n *\n * @param children the children of the calling component\n * @param componentName the displayName of the calling component\n */\nexport function expectsIconWrapper({ children, componentName }) {\n const childrenComponents = Children.toArray(children);\n\n childrenComponents.map((child) => {\n if (isValidElement(child)) {\n // icons should never be a direct child of the parent\n if (child.type.name?.startsWith('Svg')) {\n throw new Error(\n `${componentName} is using an icon without the required Icon wrapper`,\n );\n }\n }\n });\n}\n"]}
package/dist/lib/utils.js CHANGED
@@ -1,2 +1,2 @@
1
- import {clsx}from'clsx';import {extendTailwindMerge,validators}from'tailwind-merge';import {createTV}from'tailwind-variants';var a=extendTailwindMerge({extend:{classGroups:{icon:[{icon:["",validators.isAny]}],"icon-size":[{"icon-size":["",validators.isAny]}],fg:[{fg:["",validators.isAny]}]},conflictingClassGroups:{fg:["icon","text-color"]},theme:{color:["current","surface-default","surface-raised","surface-overlay","transparent-dark","transparent-light","interactive-default","interactive-hover-light","interactive-hover-dark","interactive-disabled","static-light","static-dark","interactive","interactive-hover","highlight-bold","highlight-hover","highlight-subtle","info-bold","info-hover","info-subtle","advisory-bold","advisory-hover","advisory-subtle","normal-bold","normal-hover","normal-subtle","serious-bold","serious-hover","serious-subtle","critical-bold","critical-hover","critical-subtle","default-light","default-dark","inverse-dark","inverse-light","disabled","highlight","info","advisory","normal","serious","critical","classification-missing","classification-unclass","classification-cui","classification-confidential","classification-secret","classification-top-secret"],font:["primary","display"],text:["header-xxl","header-xl","header-l","header-m","header-s","header-xs","body-xl","body-l","body-m","body-s","body-xs","body-xxs","button-xl","button-l","button-m","button-s","button-xs"],radius:["none","small","medium","large","round"],shadow:["elevation-default","elevation-overlay","elevation-raised"],spacing:["none","0","xxs","xs","s","m","l","xl","xxl","oversized"]}}});function c(...i){return a(clsx(i))}var d=createTV({twMergeConfig:{extend:{classGroups:{icon:[{icon:["",validators.isAny]}],"icon-size":[{"icon-size":["",validators.isAny]}],fg:[{fg:["",validators.isAny]}]},conflictingClassGroups:{fg:["icon","text-color"]},theme:{color:["current","surface-default","surface-raised","surface-overlay","transparent-dark","transparent-light","interactive-default","interactive-hover-light","interactive-hover-dark","interactive-disabled","static-light","static-dark","interactive","interactive-hover","highlight-bold","highlight-hover","highlight-subtle","info-bold","info-hover","info-subtle","advisory-bold","advisory-hover","advisory-subtle","normal-bold","normal-hover","normal-subtle","serious-bold","serious-hover","serious-subtle","critical-bold","critical-hover","critical-subtle","default-light","default-dark","inverse-dark","inverse-light","disabled","highlight","info","advisory","normal","serious","critical","classification-missing","classification-unclass","classification-cui","classification-confidential","classification-secret","classification-top-secret"],font:["primary","display"],text:["header-xxl","header-xl","header-l","header-m","header-s","header-xs","body-xl","body-l","body-m","body-s","body-xs","body-xxs","button-xl","button-l","button-m","button-s","button-xs"],radius:["none","small","medium","large","round"],shadow:["elevation-default","elevation-overlay","elevation-raised"],spacing:["none","0","xxs","xs","s","m","l","xl","xxl","oversized"]}}}});function u(i){return !!i&&"slots"in i}export{c as cn,u as isSlottedContextValue,d as tv,a as twMerge};//# sourceMappingURL=utils.js.map
1
+ import {clsx}from'clsx';import {extendTailwindMerge,validators}from'tailwind-merge';import {createTV}from'tailwind-variants';var r=extendTailwindMerge({extend:{classGroups:{icon:[{icon:["",validators.isAny]}],fg:[{fg:["",validators.isAny]}]},conflictingClassGroups:{fg:["icon","text-color"]},theme:{color:["current","surface-default","surface-raised","surface-overlay","transparent-dark","transparent-light","interactive-default","interactive-hover-light","interactive-hover-dark","interactive-disabled","static-light","static-dark","interactive","interactive-hover","highlight-bold","highlight-hover","highlight-subtle","info-bold","info-hover","info-subtle","advisory-bold","advisory-hover","advisory-subtle","normal-bold","normal-hover","normal-subtle","serious-bold","serious-hover","serious-subtle","critical-bold","critical-hover","critical-subtle","default-light","default-dark","inverse-dark","inverse-light","disabled","highlight","info","advisory","normal","serious","critical","classification-missing","classification-unclass","classification-cui","classification-confidential","classification-secret","classification-top-secret"],font:["primary","display"],text:["header-xxl","header-xl","header-l","header-m","header-s","header-xs","body-xl","body-l","body-m","body-s","body-xs","body-xxs","button-xl","button-l","button-m","button-s","button-xs"],radius:["none","small","medium","large","round"],shadow:["elevation-default","elevation-overlay","elevation-raised"],spacing:["none","0","xxs","xs","s","m","l","xl","xxl","oversized"]}}});function d(...e){return r(clsx(e))}var c=createTV({twMergeConfig:{extend:{classGroups:{icon:[{icon:["",validators.isAny]}],fg:[{fg:["",validators.isAny]}]},conflictingClassGroups:{fg:["icon","text-color"]},theme:{color:["current","surface-default","surface-raised","surface-overlay","transparent-dark","transparent-light","interactive-default","interactive-hover-light","interactive-hover-dark","interactive-disabled","static-light","static-dark","interactive","interactive-hover","highlight-bold","highlight-hover","highlight-subtle","info-bold","info-hover","info-subtle","advisory-bold","advisory-hover","advisory-subtle","normal-bold","normal-hover","normal-subtle","serious-bold","serious-hover","serious-subtle","critical-bold","critical-hover","critical-subtle","default-light","default-dark","inverse-dark","inverse-light","disabled","highlight","info","advisory","normal","serious","critical","classification-missing","classification-unclass","classification-cui","classification-confidential","classification-secret","classification-top-secret"],font:["primary","display"],text:["header-xxl","header-xl","header-l","header-m","header-s","header-xs","body-xl","body-l","body-m","body-s","body-xs","body-xxs","button-xl","button-l","button-m","button-s","button-xs"],radius:["none","small","medium","large","round"],shadow:["elevation-default","elevation-overlay","elevation-raised"],spacing:["none","0","xxs","xs","s","m","l","xl","xxl","oversized"]}}}});function u(e){return !!e&&"slots"in e}export{d as cn,u as isSlottedContextValue,c as tv,r as twMerge};//# sourceMappingURL=utils.js.map
2
2
  //# sourceMappingURL=utils.js.map