@accelint/design-toolkit 2.2.0 → 2.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.
- package/README.md +1 -0
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/accordion/index.js +1 -1
- package/dist/components/accordion/index.js.map +1 -1
- package/dist/components/accordion/styles.d.ts +3 -39
- package/dist/components/accordion/styles.js +1 -1
- package/dist/components/accordion/styles.js.map +1 -1
- package/dist/components/avatar/index.d.ts +4 -4
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/box/index.d.ts +3 -3
- package/dist/components/button/index.d.ts +35 -23
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/styles.d.ts +297 -0
- package/dist/components/button/styles.js +2 -0
- package/dist/components/button/styles.js.map +1 -0
- package/dist/components/button/types.d.ts +14 -0
- package/dist/components/button/types.js +2 -0
- package/dist/components/button/types.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/index.js.map +1 -1
- package/dist/components/chip/index.d.ts +25 -48
- package/dist/components/chip/index.js +1 -1
- package/dist/components/chip/index.js.map +1 -1
- package/dist/components/chip/styles.d.ts +250 -0
- package/dist/components/chip/styles.js +2 -0
- package/dist/components/chip/styles.js.map +1 -0
- package/dist/components/chip/types.d.ts +20 -0
- package/dist/components/chip/types.js +2 -0
- package/dist/components/chip/types.js.map +1 -0
- package/dist/components/classification-badge/index.d.ts +15 -16
- package/dist/components/classification-badge/index.js +1 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-badge/styles.d.ts +51 -0
- package/dist/components/classification-badge/styles.js +2 -0
- package/dist/components/classification-badge/styles.js.map +1 -0
- package/dist/components/classification-badge/types.d.ts +9 -0
- package/dist/components/classification-badge/types.js +2 -0
- package/dist/components/classification-badge/types.js.map +1 -0
- package/dist/components/classification-banner/index.d.ts +15 -16
- package/dist/components/classification-banner/index.js +1 -2
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/classification-banner/styles.d.ts +38 -0
- package/dist/components/classification-banner/styles.js +2 -0
- package/dist/components/classification-banner/styles.js.map +1 -0
- package/dist/components/classification-banner/types.d.ts +9 -0
- package/dist/components/classification-banner/types.js +2 -0
- package/dist/components/classification-banner/types.js.map +1 -0
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/combobox/index.js.map +1 -1
- package/dist/components/date-field/index.js +1 -1
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/dialog/index.d.ts +5 -5
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/index.js.map +1 -1
- package/dist/components/icon/index.d.ts +2 -2
- package/dist/components/icon/index.js +1 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/icon/types.d.ts +3 -5
- package/dist/components/label/index.d.ts +10 -7
- package/dist/components/label/index.js +1 -1
- package/dist/components/label/index.js.map +1 -1
- package/dist/components/label/styles.d.ts +5 -0
- package/dist/components/label/styles.js +2 -0
- package/dist/components/label/styles.js.map +1 -0
- package/dist/components/label/types.d.ts +10 -0
- package/dist/components/label/types.js +2 -0
- package/dist/components/label/types.js.map +1 -0
- package/dist/components/options/index.d.ts +2 -2
- package/dist/components/options/index.js +1 -1
- package/dist/components/options/index.js.map +1 -1
- package/dist/components/options-item/index.js +1 -1
- package/dist/components/options-item/index.js.map +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/popover/styles.d.ts +3 -3
- package/dist/components/query-builder/index.js +1 -1
- package/dist/components/query-builder/index.js.map +1 -1
- package/dist/components/query-builder/value-editor.js +1 -1
- package/dist/components/query-builder/value-editor.js.map +1 -1
- package/dist/components/radio/index.d.ts +11 -9
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.js.map +1 -1
- package/dist/components/radio/styles.d.ts +53 -0
- package/dist/components/radio/styles.js +2 -0
- package/dist/components/radio/styles.js.map +1 -0
- package/dist/components/radio/types.d.ts +21 -0
- package/dist/components/radio/types.js +2 -0
- package/dist/components/radio/types.js.map +1 -0
- package/dist/components/search-field/index.js +1 -1
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.js.map +1 -1
- package/dist/components/switch/index.d.ts +10 -7
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.js.map +1 -1
- package/dist/components/switch/styles.d.ts +41 -0
- package/dist/components/switch/styles.js +2 -0
- package/dist/components/switch/styles.js.map +1 -0
- package/dist/components/switch/types.d.ts +13 -0
- package/dist/components/switch/types.js +2 -0
- package/dist/components/switch/types.js.map +1 -0
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/text-area-field/index.d.ts +19 -0
- package/dist/components/text-area-field/index.js +2 -0
- package/dist/components/text-area-field/index.js.map +1 -0
- package/dist/components/text-area-field/styles.d.ts +113 -0
- package/dist/components/text-area-field/styles.js +2 -0
- package/dist/components/text-area-field/styles.js.map +1 -0
- package/dist/components/text-area-field/types.d.ts +23 -0
- package/dist/components/text-area-field/types.js +2 -0
- package/dist/components/text-area-field/types.js.map +1 -0
- package/dist/components/text-field/index.js +1 -1
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/index.css +122 -252
- package/dist/index.d.ts +25 -11
- package/dist/index.js +1 -1
- package/dist/lib/react.js.map +1 -1
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.js.map +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/styles.css +873 -754
- package/dist/tokens/generated/themes.css +147 -0
- package/dist/tokens/generated/themes.d.ts +2 -0
- package/dist/tokens/generated/tokens.css +119 -0
- package/dist/tokens/generated/tokens.d.ts +108 -0
- package/dist/tokens/generated/tokens.js +2 -0
- package/dist/tokens/generated/tokens.js.map +1 -0
- package/package.json +5 -5
- package/dist/components/floating-button/index.d.ts +0 -18
- package/dist/components/floating-button/index.js +0 -2
- package/dist/components/floating-button/index.js.map +0 -1
- package/dist/components/icon-button/index.d.ts +0 -20
- package/dist/components/icon-button/index.js +0 -2
- package/dist/components/icon-button/index.js.map +0 -1
- package/dist/components/text-area/index.d.ts +0 -30
- package/dist/components/text-area/index.js +0 -2
- package/dist/components/text-area/index.js.map +0 -1
- package/dist/components/toggle-icon-button/index.d.ts +0 -20
- package/dist/components/toggle-icon-button/index.js +0 -2
- package/dist/components/toggle-icon-button/index.js.map +0 -1
@@ -0,0 +1,250 @@
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
|
3
|
+
declare const ChipStylesDefaults: {
|
4
|
+
readonly size: "medium";
|
5
|
+
readonly variant: "info";
|
6
|
+
};
|
7
|
+
declare const BaseChipStyles: tailwind_variants.TVReturnType<{
|
8
|
+
size: {
|
9
|
+
medium: {
|
10
|
+
chip: string;
|
11
|
+
};
|
12
|
+
small: {
|
13
|
+
chip: string;
|
14
|
+
};
|
15
|
+
};
|
16
|
+
}, {
|
17
|
+
list: string;
|
18
|
+
chip: string;
|
19
|
+
}, undefined, {
|
20
|
+
size: {
|
21
|
+
medium: {
|
22
|
+
chip: string;
|
23
|
+
};
|
24
|
+
small: {
|
25
|
+
chip: string;
|
26
|
+
};
|
27
|
+
};
|
28
|
+
}, {
|
29
|
+
list: string;
|
30
|
+
chip: string;
|
31
|
+
}, tailwind_variants.TVReturnType<{
|
32
|
+
size: {
|
33
|
+
medium: {
|
34
|
+
chip: string;
|
35
|
+
};
|
36
|
+
small: {
|
37
|
+
chip: string;
|
38
|
+
};
|
39
|
+
};
|
40
|
+
}, {
|
41
|
+
list: string;
|
42
|
+
chip: string;
|
43
|
+
}, undefined, unknown, unknown, undefined>>;
|
44
|
+
declare const ChipStyles: tailwind_variants.TVReturnType<{
|
45
|
+
variant: {
|
46
|
+
advisory: {
|
47
|
+
chip: string;
|
48
|
+
};
|
49
|
+
critical: {
|
50
|
+
chip: string;
|
51
|
+
};
|
52
|
+
serious: {
|
53
|
+
chip: string;
|
54
|
+
};
|
55
|
+
normal: {
|
56
|
+
chip: string;
|
57
|
+
};
|
58
|
+
info: {
|
59
|
+
chip: string;
|
60
|
+
};
|
61
|
+
};
|
62
|
+
}, {
|
63
|
+
chip: string;
|
64
|
+
}, undefined, {
|
65
|
+
size: {
|
66
|
+
medium: {
|
67
|
+
chip: string;
|
68
|
+
};
|
69
|
+
small: {
|
70
|
+
chip: string;
|
71
|
+
};
|
72
|
+
};
|
73
|
+
}, {
|
74
|
+
list: string;
|
75
|
+
chip: string;
|
76
|
+
}, tailwind_variants.TVReturnType<{
|
77
|
+
size: {
|
78
|
+
medium: {
|
79
|
+
chip: string;
|
80
|
+
};
|
81
|
+
small: {
|
82
|
+
chip: string;
|
83
|
+
};
|
84
|
+
};
|
85
|
+
}, {
|
86
|
+
list: string;
|
87
|
+
chip: string;
|
88
|
+
}, undefined, {
|
89
|
+
size: {
|
90
|
+
medium: {
|
91
|
+
chip: string;
|
92
|
+
};
|
93
|
+
small: {
|
94
|
+
chip: string;
|
95
|
+
};
|
96
|
+
};
|
97
|
+
}, {
|
98
|
+
list: string;
|
99
|
+
chip: string;
|
100
|
+
}, tailwind_variants.TVReturnType<{
|
101
|
+
size: {
|
102
|
+
medium: {
|
103
|
+
chip: string;
|
104
|
+
};
|
105
|
+
small: {
|
106
|
+
chip: string;
|
107
|
+
};
|
108
|
+
};
|
109
|
+
}, {
|
110
|
+
list: string;
|
111
|
+
chip: string;
|
112
|
+
}, undefined, unknown, unknown, undefined>>>;
|
113
|
+
declare const SelectableChipStyles: tailwind_variants.TVReturnType<{
|
114
|
+
[key: string]: {
|
115
|
+
[key: string]: tailwind_variants.ClassValue | {
|
116
|
+
chip?: tailwind_variants.ClassValue;
|
117
|
+
};
|
118
|
+
};
|
119
|
+
} | {
|
120
|
+
size: {
|
121
|
+
medium: tailwind_variants.ClassValue | {
|
122
|
+
chip?: tailwind_variants.ClassValue;
|
123
|
+
};
|
124
|
+
small: tailwind_variants.ClassValue | {
|
125
|
+
chip?: tailwind_variants.ClassValue;
|
126
|
+
};
|
127
|
+
};
|
128
|
+
}, {
|
129
|
+
chip: string[];
|
130
|
+
}, undefined, {
|
131
|
+
size: {
|
132
|
+
medium: {
|
133
|
+
chip: string;
|
134
|
+
};
|
135
|
+
small: {
|
136
|
+
chip: string;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
}, {
|
140
|
+
list: string;
|
141
|
+
chip: string;
|
142
|
+
}, tailwind_variants.TVReturnType<{
|
143
|
+
size: {
|
144
|
+
medium: {
|
145
|
+
chip: string;
|
146
|
+
};
|
147
|
+
small: {
|
148
|
+
chip: string;
|
149
|
+
};
|
150
|
+
};
|
151
|
+
}, {
|
152
|
+
list: string;
|
153
|
+
chip: string;
|
154
|
+
}, undefined, {
|
155
|
+
size: {
|
156
|
+
medium: {
|
157
|
+
chip: string;
|
158
|
+
};
|
159
|
+
small: {
|
160
|
+
chip: string;
|
161
|
+
};
|
162
|
+
};
|
163
|
+
}, {
|
164
|
+
list: string;
|
165
|
+
chip: string;
|
166
|
+
}, tailwind_variants.TVReturnType<{
|
167
|
+
size: {
|
168
|
+
medium: {
|
169
|
+
chip: string;
|
170
|
+
};
|
171
|
+
small: {
|
172
|
+
chip: string;
|
173
|
+
};
|
174
|
+
};
|
175
|
+
}, {
|
176
|
+
list: string;
|
177
|
+
chip: string;
|
178
|
+
}, undefined, unknown, unknown, undefined>>>;
|
179
|
+
declare const DeletableChipStyles: tailwind_variants.TVReturnType<{
|
180
|
+
[key: string]: {
|
181
|
+
[key: string]: tailwind_variants.ClassValue | {
|
182
|
+
chip?: tailwind_variants.ClassValue;
|
183
|
+
remove?: tailwind_variants.ClassValue;
|
184
|
+
};
|
185
|
+
};
|
186
|
+
} | {
|
187
|
+
size: {
|
188
|
+
medium: tailwind_variants.ClassValue | {
|
189
|
+
chip?: tailwind_variants.ClassValue;
|
190
|
+
remove?: tailwind_variants.ClassValue;
|
191
|
+
};
|
192
|
+
small: tailwind_variants.ClassValue | {
|
193
|
+
chip?: tailwind_variants.ClassValue;
|
194
|
+
remove?: tailwind_variants.ClassValue;
|
195
|
+
};
|
196
|
+
};
|
197
|
+
}, {
|
198
|
+
chip: string[];
|
199
|
+
remove: string[];
|
200
|
+
}, undefined, {
|
201
|
+
size: {
|
202
|
+
medium: {
|
203
|
+
chip: string;
|
204
|
+
};
|
205
|
+
small: {
|
206
|
+
chip: string;
|
207
|
+
};
|
208
|
+
};
|
209
|
+
}, {
|
210
|
+
list: string;
|
211
|
+
chip: string;
|
212
|
+
}, tailwind_variants.TVReturnType<{
|
213
|
+
size: {
|
214
|
+
medium: {
|
215
|
+
chip: string;
|
216
|
+
};
|
217
|
+
small: {
|
218
|
+
chip: string;
|
219
|
+
};
|
220
|
+
};
|
221
|
+
}, {
|
222
|
+
list: string;
|
223
|
+
chip: string;
|
224
|
+
}, undefined, {
|
225
|
+
size: {
|
226
|
+
medium: {
|
227
|
+
chip: string;
|
228
|
+
};
|
229
|
+
small: {
|
230
|
+
chip: string;
|
231
|
+
};
|
232
|
+
};
|
233
|
+
}, {
|
234
|
+
list: string;
|
235
|
+
chip: string;
|
236
|
+
}, tailwind_variants.TVReturnType<{
|
237
|
+
size: {
|
238
|
+
medium: {
|
239
|
+
chip: string;
|
240
|
+
};
|
241
|
+
small: {
|
242
|
+
chip: string;
|
243
|
+
};
|
244
|
+
};
|
245
|
+
}, {
|
246
|
+
list: string;
|
247
|
+
chip: string;
|
248
|
+
}, undefined, unknown, unknown, undefined>>>;
|
249
|
+
|
250
|
+
export { BaseChipStyles, ChipStyles, ChipStylesDefaults, DeletableChipStyles, SelectableChipStyles };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {tv}from'./../../lib/utils.js';var i={size:"medium",variant:"info"},t=tv({slots:{list:"flex w-content flex-wrap gap-xs",chip:"fg-default-light inline-flex w-content items-center justify-center rounded-full outline"},variants:{size:{medium:{chip:"px-s py-xs text-body-s"},small:{chip:"px-s py-xs text-body-xs"}}},defaultVariants:i}),s=tv({extend:t,slots:{chip:"gap-xxs"},variants:{variant:{advisory:{chip:"bg-advisory-subtle outline-advisory-bold"},critical:{chip:"bg-critical-subtle outline-critical"},serious:{chip:"bg-serious-subtle outline-serious"},normal:{chip:"bg-normal-subtle outline-normal"},info:{chip:"bg-info-subtle outline-info-bold"}}}}),o=tv({extend:t,slots:{chip:["cursor-pointer outline-interactive","enabled:focus:outline-interactive-hover","enabled:hover:outline-interactive-hover","enabled:selected:bg-highlight-subtle enabled:selected:outline-highlight","disabled:fg-disabled disabled:cursor-not-allowed disabled:outline-interactive-disabled","disabled:selected:bg-interactive-disabled"]}}),n=tv({extend:t,slots:{chip:["group gap-xs outline-interactive","enabled:focus:outline-interactive-hover","enabled:hover:outline-interactive-hover","disabled:fg-disabled disabled:cursor-not-allowed disabled:outline-interactive-disabled"],remove:["cursor-pointer","disabled:cursor-not-allowed"]}});export{t as BaseChipStyles,s as ChipStyles,i as ChipStylesDefaults,n as DeletableChipStyles,o as SelectableChipStyles};//# sourceMappingURL=styles.js.map
|
2
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/chip/styles.ts"],"names":["e","tv","BaseChipStyles","SelectableChipStyles"],"mappings":"sCAeE,IAAA,CAAM,CAAA,CAAA,IAAA,CAAA,QACN,CAAA,OACF,CAAA,MAGE,CAAA,CAAA,CAAA,CAAAA,EAAA,CAAO,CACL,KAAM,CAAA,CAAA,IAAA,CAAA,iCACA,CAAA,IAAA,CAAA,yFAER,CAAA,CAAA,QACQ,CACJ,CAAA,IAAA,CAAA,CAAQ,MACA,CAAA,CAAA,IAAA,CAAA,wBAER,CAAO,CACL,KAAM,CAAA,CAAA,IAAA,CAAA,yBAIZ,CAAA,CAAA,CAAA,CAAA,eAGwBC,CAAAA,CAAG,CAC3B,CAAA,CAAA,CAAA,CAAAD,EAAA,CAAA,CAAQE,MACR,CAAA,CAAO,CACL,KAAM,CAAA,CAAA,IAAA,CAAA,SAER,CAAA,CAAA,QACE,CAAA,CAAA,OACE,CAAA,CAAA,QAAkB,CAAA,CAAA,IAAA,CAAA,0CAClB,CAAA,CAAA,QAAkB,CAAA,CAAA,IAAA,CAAA,qCAClB,CAAA,CAAA,OAAiB,CAAA,CAAA,IAAA,CAAA,mCACjB,CAAA,CAAQ,MAAQ,CAAA,CAAA,IAAA,CAAA,iCACV,CAAE,CAAA,IAAM,CAAA,CAAA,IAAA,CAAA,kCAKPC,CAAuBF,CAAAA,CAAG,CACrC,CAAA,CAAA,CAAA,CAAAD,EAAA,CAAA,CAAQE,MACR,CAAA,CAAO,CACL,KAAM,CACJ,CAAA,IAAA,CAAA,CAAA,oCACA,CAAA,yCACA,CAAA,yCACA,CAAA,yEACA,CAAA,wFACA,CAAA,2CAK6BD,CAAAA,CAAG,CACpC,CAAA,CAAA,CAAA,CAAAD,EAAA,CAAA,CAAQE,MACR,CAAA,CAAO,CACL,KAAM,CACJ,CAAA,IAAA,CAAA,CAAA,kCACA,CAAA,yCACA,CAAA,yCACA,CAAA,wFAEF,CAAA,CAAQ,MAAC,CAAA,CAAA,gBAAkB,CAAA,6BAE9B,CAAA,CAAA,CAAA","file":"styles.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\nimport { tv } from '@/lib/utils';\n\nexport const ChipStylesDefaults = {\n size: 'medium',\n variant: 'info',\n} as const;\n\nexport const BaseChipStyles = tv({\n slots: {\n list: 'flex w-content flex-wrap gap-xs',\n chip: 'fg-default-light inline-flex w-content items-center justify-center rounded-full outline',\n },\n variants: {\n size: {\n medium: {\n chip: 'px-s py-xs text-body-s',\n },\n small: {\n chip: 'px-s py-xs text-body-xs',\n },\n },\n },\n defaultVariants: ChipStylesDefaults,\n});\n\nexport const ChipStyles = tv({\n extend: BaseChipStyles,\n slots: {\n chip: 'gap-xxs',\n },\n variants: {\n variant: {\n advisory: { chip: 'bg-advisory-subtle outline-advisory-bold' },\n critical: { chip: 'bg-critical-subtle outline-critical' },\n serious: { chip: 'bg-serious-subtle outline-serious' },\n normal: { chip: 'bg-normal-subtle outline-normal' },\n info: { chip: 'bg-info-subtle outline-info-bold' },\n },\n },\n});\n\nexport const SelectableChipStyles = tv({\n extend: BaseChipStyles,\n slots: {\n chip: [\n 'cursor-pointer outline-interactive',\n 'enabled:focus:outline-interactive-hover',\n 'enabled:hover:outline-interactive-hover',\n 'enabled:selected:bg-highlight-subtle enabled:selected:outline-highlight',\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:outline-interactive-disabled',\n 'disabled:selected:bg-interactive-disabled',\n ],\n },\n});\n\nexport const DeletableChipStyles = tv({\n extend: BaseChipStyles,\n slots: {\n chip: [\n 'group gap-xs outline-interactive',\n 'enabled:focus:outline-interactive-hover',\n 'enabled:hover:outline-interactive-hover',\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:outline-interactive-disabled',\n ],\n remove: ['cursor-pointer', 'disabled:cursor-not-allowed'],\n },\n});\n"]}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { HTMLProps, RefAttributes, PropsWithChildren } from 'react';
|
2
|
+
import { TagGroupProps, TagListProps, TagProps, ButtonProps } from 'react-aria-components';
|
3
|
+
import { VariantProps } from 'tailwind-variants';
|
4
|
+
import { ChipStyles, BaseChipStyles, DeletableChipStyles, SelectableChipStyles } from './styles.js';
|
5
|
+
|
6
|
+
type BaseChipProps = VariantProps<typeof BaseChipStyles>;
|
7
|
+
type ChipProps = VariantProps<typeof ChipStyles> & Omit<HTMLProps<HTMLDivElement>, 'size'> & RefAttributes<HTMLDivElement> & {
|
8
|
+
className?: string;
|
9
|
+
};
|
10
|
+
type ChipListProps<T> = Omit<TagGroupProps, 'children'> & Pick<TagListProps<T>, 'dependencies' | 'items' | 'children' | 'renderEmptyState'> & RefAttributes<HTMLDivElement> & BaseChipProps;
|
11
|
+
type SelectableChipProps = Omit<TagProps, 'isDisabled'> & RefAttributes<HTMLDivElement> & VariantProps<typeof SelectableChipStyles>;
|
12
|
+
type DeletableChipProps = Omit<TagProps, 'className' | 'isDisabled'> & RefAttributes<HTMLDivElement> & VariantProps<typeof DeletableChipStyles> & {
|
13
|
+
classNames?: {
|
14
|
+
chip?: TagProps['className'];
|
15
|
+
remove?: ButtonProps['className'];
|
16
|
+
};
|
17
|
+
};
|
18
|
+
type ChipProviderProps = PropsWithChildren<BaseChipProps>;
|
19
|
+
|
20
|
+
export type { BaseChipProps, ChipListProps, ChipProps, ChipProviderProps, DeletableChipProps, SelectableChipProps };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import * as
|
3
|
-
import {
|
2
|
+
import * as react from 'react';
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
4
|
+
import { ClassificationBadgeProps, ClassificationBadgeProviderProps } from './types.js';
|
5
|
+
import 'tailwind-variants';
|
6
|
+
import './styles.js';
|
4
7
|
|
5
|
-
declare const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
declare const ClassificationBadgeContext: react.Context<ContextValue<ClassificationBadgeProps, HTMLSpanElement>>;
|
9
|
+
declare function ClassificationBadgeProvider({ children, ...props }: ClassificationBadgeProviderProps): react_jsx_runtime.JSX.Element;
|
10
|
+
declare namespace ClassificationBadgeProvider {
|
11
|
+
var displayName: string;
|
12
|
+
}
|
13
|
+
declare function ClassificationBadge({ ref, ...props }: ClassificationBadgeProps): react_jsx_runtime.JSX.Element;
|
14
|
+
declare namespace ClassificationBadge {
|
15
|
+
var displayName: string;
|
16
|
+
var Provider: typeof ClassificationBadgeProvider;
|
13
17
|
}
|
14
|
-
declare const ClassificationBadge: {
|
15
|
-
({ className, size, variant, ...props }: ClassificationBadgeProps): react_jsx_runtime.JSX.Element;
|
16
|
-
displayName: string;
|
17
|
-
as(props: VariantProps<typeof classificationBadge>, className?: string | string[]): string;
|
18
|
-
};
|
19
18
|
|
20
|
-
export { ClassificationBadge,
|
19
|
+
export { ClassificationBadge, ClassificationBadgeContext };
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {
|
1
|
+
import {createContext}from'react';import {useContextProps}from'react-aria-components';import {ClassificationBadgeStylesDefaults,ClassificationBadgeStyles}from'./styles.js';import {jsx}from'react/jsx-runtime';var s=createContext(null);function t({children:i,...a}){return jsx(s.Provider,{value:a,children:i})}t.displayName="ClassificationBadge.Provider";function o({ref:i,...a}){[a,i]=useContextProps(a,i??null,s);let{className:r,size:l=ClassificationBadgeStylesDefaults.size,variant:d=ClassificationBadgeStylesDefaults.variant,children:c,...f}=a;return jsx("span",{...f,className:ClassificationBadgeStyles({size:l,variant:d,className:r}),children:c})}o.displayName="ClassificationBadge";o.Provider=t;export{o as ClassificationBadge,s as ClassificationBadgeContext};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/classification-badge/index.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/classification-badge/index.tsx"],"names":["ClassificationBadgeContext","createContext","ClassificationBadgeProvider","children","props","ref","useContextProps","className","size","ClassificationBadgeStylesDefaults","variant","jsx","rest","ClassificationBadgeStyles","ClassificationBadge"],"mappings":"gNAuBaA,IAAAA,CACXC,cAAuE,CAAA,IAAI,EAE7E,SAASC,CAA4B,CACnC,CAAA,QAAAC,EACA,CAAA,GACF,EAAqC,CACnC,CAAA,UACGH,CAAAA,CAA2B,CAAA,QAA3B,CAAoC,CAAA,KAAOI,CAAAA,CACzC,CAAA,QAAAD,EACH,CAEJ,CACAD,CAAAA,CAA4B,CAAA,WAAc,CAAA,8BAEnC,CAAA,UAA6B,CAClC,CAAA,GAAAG,CAAAA,CACA,CAAA,GACF,CAAA,CAA6B,CAC3B,CAACD,CAAAA,CAAOC,CAAG,CAAA,CAAIC,CAAAA,eACbF,EACAC,CAAAA,CAAAA,EAAO,IACPL,CACF,CAAA,CAEA,CAAA,GACE,UAAAO,CAAAA,CACA,CAAA,IAAAC,CAAAA,CAAOC,CAAAA,iCAAkC,CAAA,IACzC,CAAA,OAAAC,EAAUD,CAAAA,iCAAkC,CAAA,OAC5C,CAAA,QAAAN,CAAAA,CACA,CAAA,GACF,EAAIC,CAAAA,CAEJ,CAAA,OACEO,GAAC,CAAA,MAAA,CACE,CAAA,GAAGC,CACJ,UAAWC,CAAAA,yBAA0B,CACnC,CAAA,IAAAL,CAAAA,CACA,CAAA,OAAAE,CAAAA,CACA,UAAAH,CACF,CAAC,CAAA,CAEA,CAAA,QAAAJ,CAAAA,CACH,CAEJ,CACAW,CAAAA,CAAoB,CAAA,WAAc,CAAA,qBAClCA,CAAAA,CAAoB,CAAA,QAAWZ,CAAAA,CAAAA","file":"index.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\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport {\n ClassificationBadgeStyles,\n ClassificationBadgeStylesDefaults,\n} from './styles';\nimport type {\n ClassificationBadgeProps,\n ClassificationBadgeProviderProps,\n} from './types';\n\nexport const ClassificationBadgeContext =\n createContext<ContextValue<ClassificationBadgeProps, HTMLSpanElement>>(null);\n\nfunction ClassificationBadgeProvider({\n children,\n ...props\n}: ClassificationBadgeProviderProps) {\n return (\n <ClassificationBadgeContext.Provider value={props}>\n {children}\n </ClassificationBadgeContext.Provider>\n );\n}\nClassificationBadgeProvider.displayName = 'ClassificationBadge.Provider';\n\nexport function ClassificationBadge({\n ref,\n ...props\n}: ClassificationBadgeProps) {\n [props, ref] = useContextProps(\n props,\n ref ?? null,\n ClassificationBadgeContext,\n );\n\n const {\n className,\n size = ClassificationBadgeStylesDefaults.size,\n variant = ClassificationBadgeStylesDefaults.variant,\n children,\n ...rest\n } = props;\n\n return (\n <span\n {...rest}\n className={ClassificationBadgeStyles({\n size,\n variant,\n className,\n })}\n >\n {children}\n </span>\n );\n}\nClassificationBadge.displayName = 'ClassificationBadge';\nClassificationBadge.Provider = ClassificationBadgeProvider;\n"]}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
|
3
|
+
declare const ClassificationBadgeStylesDefaults: {
|
4
|
+
readonly variant: "missing";
|
5
|
+
readonly size: "medium";
|
6
|
+
};
|
7
|
+
declare const ClassificationBadgeStyles: tailwind_variants.TVReturnType<{
|
8
|
+
variant: {
|
9
|
+
missing: string;
|
10
|
+
unclassified: string;
|
11
|
+
cui: string;
|
12
|
+
confidential: string;
|
13
|
+
secret: string;
|
14
|
+
'top-secret': string;
|
15
|
+
'ts-sci': string;
|
16
|
+
};
|
17
|
+
size: {
|
18
|
+
small: string;
|
19
|
+
medium: string;
|
20
|
+
};
|
21
|
+
}, undefined, "inline-flex items-center justify-center rounded-full px-s py-xs uppercase", {
|
22
|
+
variant: {
|
23
|
+
missing: string;
|
24
|
+
unclassified: string;
|
25
|
+
cui: string;
|
26
|
+
confidential: string;
|
27
|
+
secret: string;
|
28
|
+
'top-secret': string;
|
29
|
+
'ts-sci': string;
|
30
|
+
};
|
31
|
+
size: {
|
32
|
+
small: string;
|
33
|
+
medium: string;
|
34
|
+
};
|
35
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
36
|
+
variant: {
|
37
|
+
missing: string;
|
38
|
+
unclassified: string;
|
39
|
+
cui: string;
|
40
|
+
confidential: string;
|
41
|
+
secret: string;
|
42
|
+
'top-secret': string;
|
43
|
+
'ts-sci': string;
|
44
|
+
};
|
45
|
+
size: {
|
46
|
+
small: string;
|
47
|
+
medium: string;
|
48
|
+
};
|
49
|
+
}, undefined, "inline-flex items-center justify-center rounded-full px-s py-xs uppercase", unknown, unknown, undefined>>;
|
50
|
+
|
51
|
+
export { ClassificationBadgeStyles, ClassificationBadgeStylesDefaults };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {tv}from'tailwind-variants';var t={variant:"missing",size:"medium"},s=tv({base:"inline-flex items-center justify-center rounded-full px-s py-xs uppercase",variants:{variant:{missing:"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']",unclassified:"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']",cui:"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']",confidential:"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']",secret:"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']","top-secret":"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']","ts-sci":"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['TS/SCI']"},size:{small:"text-header-xs",medium:"text-header-s"}},defaultVariants:t});export{s as ClassificationBadgeStyles,t as ClassificationBadgeStylesDefaults};//# sourceMappingURL=styles.js.map
|
2
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/classification-badge/styles.ts"],"names":["ClassificationBadgeStylesDefaults","ClassificationBadgeStyles","tv"],"mappings":"mCAcO,IAAMA,EAAoC,CAC/C,OAAA,CAAS,UACT,IAAA,CAAM,QACR,EAEaC,CAAAA,CAA4BC,EAAAA,CAAG,CAC1C,IAAA,CAAM,2EAAA,CACN,SAAU,CACR,OAAA,CAAS,CAEP,OAAA,CACE,4EAAA,CACF,aACE,sFAAA,CACF,GAAA,CAAK,0EACL,YAAA,CACE,2FAAA,CACF,OACE,+EAAA,CACF,YAAA,CACE,wFACF,QAAA,CACE,+EACJ,EACA,IAAA,CAAM,CACJ,MAAO,gBAAA,CACP,MAAA,CAAQ,eACV,CACF,CAAA,CACA,eAAA,CAAiBF,CACnB,CAAC","file":"styles.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\nimport { tv } from 'tailwind-variants';\n\nexport const ClassificationBadgeStylesDefaults = {\n variant: 'missing',\n size: 'medium',\n} as const;\n\nexport const ClassificationBadgeStyles = tv({\n base: 'inline-flex items-center justify-center rounded-full px-s py-xs uppercase',\n variants: {\n variant: {\n // TODO: dont hard code these strings into the styles\n missing:\n \"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']\",\n unclassified:\n \"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']\",\n cui: \"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']\",\n confidential:\n \"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']\",\n secret:\n \"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']\",\n 'top-secret':\n \"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']\",\n 'ts-sci':\n \"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['TS/SCI']\",\n },\n size: {\n small: 'text-header-xs',\n medium: 'text-header-s',\n },\n },\n defaultVariants: ClassificationBadgeStylesDefaults,\n});\n"]}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { RefAttributes, PropsWithChildren, HTMLAttributes } from 'react';
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
3
|
+
import { ClassificationBadgeStyles } from './styles.js';
|
4
|
+
|
5
|
+
type ClassificationBadgeStyleVariants = VariantProps<typeof ClassificationBadgeStyles>;
|
6
|
+
type ClassificationBadgeProps = ClassificationBadgeStyleVariants & RefAttributes<HTMLSpanElement> & PropsWithChildren<HTMLAttributes<HTMLSpanElement>>;
|
7
|
+
type ClassificationBadgeProviderProps = PropsWithChildren<ClassificationBadgeProps>;
|
8
|
+
|
9
|
+
export type { ClassificationBadgeProps, ClassificationBadgeProviderProps, ClassificationBadgeStyleVariants };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
2
|
-
import * as
|
3
|
-
import {
|
4
|
-
import {
|
2
|
+
import * as react from 'react';
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
4
|
+
import { ClassificationBannerProps, ClassificationBannerProviderProps } from './types.js';
|
5
|
+
import 'tailwind-variants';
|
6
|
+
import './styles.js';
|
5
7
|
|
6
|
-
declare const
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
declare const ClassificationBannerContext: react.Context<ContextValue<ClassificationBannerProps, HTMLDivElement>>;
|
9
|
+
declare function ClassificationBannerProvider({ children, ...props }: ClassificationBannerProviderProps): react_jsx_runtime.JSX.Element;
|
10
|
+
declare namespace ClassificationBannerProvider {
|
11
|
+
var displayName: string;
|
12
|
+
}
|
13
|
+
declare function ClassificationBanner({ ref, ...props }: ClassificationBannerProps): react_jsx_runtime.JSX.Element;
|
14
|
+
declare namespace ClassificationBanner {
|
15
|
+
var displayName: string;
|
16
|
+
var Provider: typeof ClassificationBannerProvider;
|
13
17
|
}
|
14
|
-
declare const ClassificationBanner: {
|
15
|
-
({ className, variant, ...props }: ClassificationBannerProps): react_jsx_runtime.JSX.Element;
|
16
|
-
displayName: string;
|
17
|
-
as(props: VariantProps<typeof classificationBanner>, className?: string | string[]): string;
|
18
|
-
};
|
19
18
|
|
20
|
-
export { ClassificationBanner,
|
19
|
+
export { ClassificationBanner, ClassificationBannerContext };
|
@@ -1,3 +1,2 @@
|
|
1
|
-
import {
|
2
|
-
export{s as ClassificationBanner};//# sourceMappingURL=index.js.map
|
1
|
+
import {createContext}from'react';import {useContextProps}from'react-aria-components';import {ClassificationBannerStylesDefaults,ClassificationBannerStyles}from'./styles.js';import {jsx}from'react/jsx-runtime';var a=createContext(null);function e({children:n,...i}){return jsx(a.Provider,{value:i,children:n})}e.displayName="ClassificationBanner.Provider";function r({ref:n,...i}){[i,n]=useContextProps(i,n??null,a);let{className:o,variant:s=ClassificationBannerStylesDefaults.variant,children:l,...c}=i;return jsx("div",{...c,className:ClassificationBannerStyles({variant:s,className:o}),children:l})}r.displayName="ClassificationBanner";r.Provider=e;export{r as ClassificationBanner,a as ClassificationBannerContext};//# sourceMappingURL=index.js.map
|
3
2
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/classification-banner/index.tsx"],"names":["
|
1
|
+
{"version":3,"sources":["../../../src/components/classification-banner/index.tsx"],"names":["ClassificationBannerContext","createContext","ClassificationBannerProvider","children","jsx","props","ClassificationBanner","ref","useContextProps","className","variant","ClassificationBannerStylesDefaults","ClassificationBannerStyles"],"mappings":"kNAuBaA,IAAAA,CACXC,CAAAA,aAAuE,CAAA,IAAI,EAE7E,SAASC,CAA6B,CACpC,CAAA,QAAAC,CAAAA,CACA,IACF,CAAA,CAAsC,CACpC,CAAA,OACEC,GAACJ,CAAAA,CAA4B,CAAA,QAA5B,CAAqC,CAAA,KAAOK,EAC1C,CAAA,QAAAF,CAAAA,CACH,CAEJ,CACAD,CAAAA,CAA6B,YAAc,CAAA,+BAEpC,CAAA,SAASI,CAAqB,CACnC,CAAA,GAAAC,CAAAA,CACA,IACF,CAAA,CAA8B,CAC5B,CAACF,CAAAA,CAAOE,CAAG,CAAA,CAAIC,CAAAA,eACbH,CAAAA,CACAE,CAAAA,CAAAA,EAAO,IACPP,CACF,EAEA,CAAA,GACE,UAAAS,CAAAA,CACA,CAAA,OAAAC,EAAUC,CAAAA,kCAAmC,CAAA,OAC7C,CAAA,QAAAR,CAAAA,CACA,CAAA,GACF,EAAIE,CAAAA,CAEJ,CAAA,UACG,CAAA,KAAA,CACE,CAAA,IACD,CAAA,SAAWO,CAAAA,0BAA2B,CACpC,CAAA,OAAAF,CAAAA,CACA,CAAA,SAAAD,CACF,CAAC,CAAA,CAEA,SAAAN,CAAAA,CACH,CAEJ,CACAG,CAAAA,CAAqB,CAAA,WAAc,CAAA,sBACnCA,CAAAA,CAAqB,CAAA,QAAWJ,CAAAA,CAAAA","file":"index.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\nimport { createContext } from 'react';\nimport { type ContextValue, useContextProps } from 'react-aria-components';\nimport {\n ClassificationBannerStyles,\n ClassificationBannerStylesDefaults,\n} from './styles';\nimport type {\n ClassificationBannerProps,\n ClassificationBannerProviderProps,\n} from './types';\n\nexport const ClassificationBannerContext =\n createContext<ContextValue<ClassificationBannerProps, HTMLDivElement>>(null);\n\nfunction ClassificationBannerProvider({\n children,\n ...props\n}: ClassificationBannerProviderProps) {\n return (\n <ClassificationBannerContext.Provider value={props}>\n {children}\n </ClassificationBannerContext.Provider>\n );\n}\nClassificationBannerProvider.displayName = 'ClassificationBanner.Provider';\n\nexport function ClassificationBanner({\n ref,\n ...props\n}: ClassificationBannerProps) {\n [props, ref] = useContextProps(\n props,\n ref ?? null,\n ClassificationBannerContext,\n );\n\n const {\n className,\n variant = ClassificationBannerStylesDefaults.variant,\n children,\n ...rest\n } = props;\n\n return (\n <div\n {...rest}\n className={ClassificationBannerStyles({\n variant,\n className,\n })}\n >\n {children}\n </div>\n );\n}\nClassificationBanner.displayName = 'ClassificationBanner';\nClassificationBanner.Provider = ClassificationBannerProvider;\n"]}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
2
|
+
|
3
|
+
declare const ClassificationBannerStylesDefaults: {
|
4
|
+
readonly variant: "missing";
|
5
|
+
};
|
6
|
+
declare const ClassificationBannerStyles: tailwind_variants.TVReturnType<{
|
7
|
+
variant: {
|
8
|
+
missing: string;
|
9
|
+
unclassified: string;
|
10
|
+
cui: string;
|
11
|
+
confidential: string;
|
12
|
+
secret: string;
|
13
|
+
'top-secret': string;
|
14
|
+
'ts-sci': string;
|
15
|
+
};
|
16
|
+
}, undefined, "flex select-none items-center justify-center font-medium text-header-m uppercase", {
|
17
|
+
variant: {
|
18
|
+
missing: string;
|
19
|
+
unclassified: string;
|
20
|
+
cui: string;
|
21
|
+
confidential: string;
|
22
|
+
secret: string;
|
23
|
+
'top-secret': string;
|
24
|
+
'ts-sci': string;
|
25
|
+
};
|
26
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
27
|
+
variant: {
|
28
|
+
missing: string;
|
29
|
+
unclassified: string;
|
30
|
+
cui: string;
|
31
|
+
confidential: string;
|
32
|
+
secret: string;
|
33
|
+
'top-secret': string;
|
34
|
+
'ts-sci': string;
|
35
|
+
};
|
36
|
+
}, undefined, "flex select-none items-center justify-center font-medium text-header-m uppercase", unknown, unknown, undefined>>;
|
37
|
+
|
38
|
+
export { ClassificationBannerStyles, ClassificationBannerStylesDefaults };
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import {tv}from'tailwind-variants';var t={variant:"missing"},s=tv({base:"flex select-none items-center justify-center font-medium text-header-m uppercase",variants:{variant:{missing:"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']",unclassified:"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']",cui:"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']",confidential:"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']",secret:"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']","top-secret":"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']","ts-sci":"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['Top_Secret/SCI']"}},defaultVariants:t});export{s as ClassificationBannerStyles,t as ClassificationBannerStylesDefaults};//# sourceMappingURL=styles.js.map
|
2
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/classification-banner/styles.ts"],"names":["ClassificationBannerStylesDefaults","ClassificationBannerStyles","tv"],"mappings":"mCAcO,IAAMA,CAAAA,CAAqC,CAChD,OAAA,CAAS,SACX,CAAA,CAEaC,CAAAA,CAA6BC,GAAG,CAC3C,IAAA,CAAM,kFAAA,CACN,QAAA,CAAU,CACR,OAAA,CAAS,CAEP,OAAA,CACE,4EAAA,CACF,aACE,sFAAA,CACF,GAAA,CAAK,yEAAA,CACL,YAAA,CACE,4FACF,MAAA,CACE,+EAAA,CACF,YAAA,CACE,uFAAA,CACF,SACE,uFACJ,CACF,CAAA,CACA,eAAA,CAAiBF,CACnB,CAAC","file":"styles.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\nimport { tv } from 'tailwind-variants';\n\nexport const ClassificationBannerStylesDefaults = {\n variant: 'missing',\n} as const;\n\nexport const ClassificationBannerStyles = tv({\n base: 'flex select-none items-center justify-center font-medium text-header-m uppercase',\n variants: {\n variant: {\n // TODO: dont hard code these strings into the styles\n missing:\n \"fg-critical bg-classification-missing [&:empty]:before:content-['Missing']\",\n unclassified:\n \"fg-default-light bg-classification-unclass [&:empty]:before:content-['Unclassified']\",\n cui: \"fg-default-light bg-classification-cui [&:empty]:before:content-['CUI']\",\n confidential:\n \"fg-default-light bg-classification-confidential [&:empty]:before:content-['Confidential']\",\n secret:\n \"fg-default-light bg-classification-secret [&:empty]:before:content-['Secret']\",\n 'top-secret':\n \"fg-inverse-light bg-classification-top-secret [&:empty]:before:content-['Top_Secret']\",\n 'ts-sci':\n \"fg-inverse-light bg-classification-ts-sci [&:empty]:before:content-['Top_Secret/SCI']\",\n },\n },\n defaultVariants: ClassificationBannerStylesDefaults,\n});\n"]}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { RefAttributes, PropsWithChildren, HTMLAttributes } from 'react';
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
3
|
+
import { ClassificationBannerStyles } from './styles.js';
|
4
|
+
|
5
|
+
type ClassificationBannerStyleVariants = VariantProps<typeof ClassificationBannerStyles>;
|
6
|
+
type ClassificationBannerProps = ClassificationBannerStyleVariants & RefAttributes<HTMLDivElement> & PropsWithChildren<HTMLAttributes<HTMLDivElement>>;
|
7
|
+
type ClassificationBannerProviderProps = PropsWithChildren<ClassificationBannerProps>;
|
8
|
+
|
9
|
+
export type { ClassificationBannerProps, ClassificationBannerProviderProps, ClassificationBannerStyleVariants };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import {cn}from'./../../lib/utils.js';import {useControlledState}from'@react-stately/utils';import {createContext,useMemo,useContext,useEffect}from'react';import {ColorSwatch,parseColor,useContextProps,ColorSwatchPickerContext,ListBox,useLocale,ListBoxItem,ColorSwatchContext}from'react-aria-components';import {jsx}from'react/jsx-runtime';var C=o=>{if(typeof o=="string")try{return parseColor(o)}catch{return}return o};function A(o){let l=useMemo(()=>C(o.value),[o.value]),r=useMemo(()=>C(o.defaultValue||"#000000"),[o.defaultValue]),[e,t]=useControlledState(l||null,r,o.onChange);return {color:e,setColor(c){t(c);}}}function I({ref:o=null,color:l,...r}){let e=l||"#0000",t=useMemo(()=>typeof e=="string"?parseColor(e):e,[e]),{locale:c}=useLocale(),
|
1
|
+
import {cn}from'./../../lib/utils.js';import {useControlledState}from'@react-stately/utils';import'client-only';import {createContext,useMemo,useContext,useEffect}from'react';import {ColorSwatch,parseColor,useContextProps,ColorSwatchPickerContext,ListBox,useLocale,ListBoxItem,ColorSwatchContext}from'react-aria-components';import {jsx}from'react/jsx-runtime';var C=o=>{if(typeof o=="string")try{return parseColor(o)}catch{return}return o};function A(o){let l=useMemo(()=>C(o.value),[o.value]),r=useMemo(()=>C(o.defaultValue||"#000000"),[o.defaultValue]),[e,t]=useControlledState(l||null,r,o.onChange);return {color:e,setColor(c){t(c);}}}function I({ref:o=null,color:l,...r}){let e=l||"#0000",t=useMemo(()=>typeof e=="string"?parseColor(e):e,[e]),{locale:c}=useLocale(),i=useContext(d);return useEffect(()=>{let s=t.toString("hexa");return i?.set(s,t),()=>{i?.delete(s);}},[t,i]),jsx(ListBoxItem,{...r,ref:o,id:t.toString("hexa"),textValue:t.getColorName(c),className:"w-fit outline-none outline outline-offset-1 hover:outline-interactive-hover hover:outline-solid focus:outline-interactive-hover focus:outline-solid data-selected:outline-highlight data-selected:outline-solid",children:jsx(ColorSwatchContext.Provider,{value:{color:t},children:r.children})})}var d=createContext(null);function L({ref:o=null,className:l,children:r,...e}){[e,o]=useContextProps(e,o,ColorSwatchPickerContext);let t=A(e),c=useMemo(()=>new Map,[]);return jsx(ListBox,{className:cn("flex flex-wrap gap-s",l),style:e.style,layout:e.layout||"grid",selectionMode:"single",selectedKeys:t.color?[t.color.toString("hexa")]:void 0,onSelectionChange:i=>{i!=="all"&&(i.size>0?t.setColor(c.get([...i][0])):t.setColor(null));},...e,children:jsx(d.Provider,{value:c,children:r})})}function M({options:o,className:l,...r}){return jsx(L,{className:cn("flex flex-wrap gap-s",l),...r,children:o.map(e=>jsx(I,{color:e,children:jsx(ColorSwatch,{className:"h-[16px] w-[16px]"})},e.toString()))})}M.displayName="ColorPicker";export{M as ColorPicker,A as useColorPickerState};//# sourceMappingURL=index.js.map
|
2
2
|
//# sourceMappingURL=index.js.map
|