@studiocms/ui 0.4.17 → 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/components/Accordion/Accordion.astro +1 -0
  2. package/dist/components/Accordion/Item.astro +8 -6
  3. package/dist/components/Accordion/accordion.css +35 -21
  4. package/dist/components/Accordion/accordion.d.ts +46 -1
  5. package/dist/components/Accordion/accordion.js +95 -70
  6. package/dist/components/Badge/Badge.astro +2 -2
  7. package/dist/components/Badge/badge.css +32 -32
  8. package/dist/components/Breadcrumbs/breadcrumbs.css +1 -1
  9. package/dist/components/Button/button.css +93 -93
  10. package/dist/components/Card/card.css +4 -4
  11. package/dist/components/Checkbox/checkbox.css +26 -26
  12. package/dist/components/Divider/Divider.astro +1 -1
  13. package/dist/components/Divider/divider.css +2 -2
  14. package/dist/components/Dropdown/Dropdown.astro +2 -2
  15. package/dist/components/Dropdown/dropdown.css +26 -26
  16. package/dist/components/Footer/footer.css +4 -4
  17. package/dist/components/Icon/Icon.astro +114 -6
  18. package/dist/components/Icon/IconBase.astro +108 -7
  19. package/dist/components/Icon/errors.d.ts +29 -0
  20. package/dist/components/Icon/errors.js +25 -0
  21. package/dist/components/Input/input.css +9 -9
  22. package/dist/components/Modal/Modal.astro +1 -1
  23. package/dist/components/Modal/modal.css +4 -4
  24. package/dist/components/Progress/progress.css +7 -7
  25. package/dist/components/RadioGroup/radiogroup.css +21 -21
  26. package/dist/components/SearchSelect/SearchSelect.astro +2 -2
  27. package/dist/components/SearchSelect/searchselect.css +28 -22
  28. package/dist/components/Select/Select.astro +2 -2
  29. package/dist/components/Select/select.css +36 -30
  30. package/dist/components/Sidebar/Double.astro +4 -4
  31. package/dist/components/Sidebar/Single.astro +2 -2
  32. package/dist/components/Skeleton/Skeleton.astro +61 -0
  33. package/dist/components/Skeleton/skeleton.css +111 -0
  34. package/dist/components/Skeleton/skeleton.d.ts +161 -0
  35. package/dist/components/Skeleton/skeleton.js +71 -0
  36. package/dist/components/Tabs/TabItem.astro +14 -9
  37. package/dist/components/Tabs/Tabs.astro +91 -54
  38. package/dist/components/Tabs/tabs.css +14 -14
  39. package/dist/components/Tabs/tabs.d.ts +17 -1
  40. package/dist/components/Tabs/tabs.js +99 -76
  41. package/dist/components/Textarea/textarea.css +8 -8
  42. package/dist/components/Toast/toaster.css +26 -23
  43. package/dist/components/Toast/toaster.js +4 -0
  44. package/dist/components/Toggle/toggle.css +13 -13
  45. package/dist/components/Tooltip/Tooltip.astro +119 -0
  46. package/dist/components/Tooltip/tooltip.css +187 -0
  47. package/dist/components/Tooltip/tooltip.d.ts +46 -0
  48. package/dist/components/Tooltip/tooltip.js +330 -0
  49. package/dist/components/User/User.astro +1 -1
  50. package/dist/components/User/user.css +3 -3
  51. package/dist/css/colors.css +85 -83
  52. package/dist/css/prose.css +360 -0
  53. package/dist/css/resets.css +3 -3
  54. package/dist/events.d.ts +104 -0
  55. package/dist/index.d.ts +25 -0
  56. package/dist/index.js +120 -313
  57. package/dist/toolbar/index.js +5 -5
  58. package/dist/types/index.d.ts +2 -0
  59. package/dist/utils/iconifyUtils.d.ts +1 -1
  60. package/dist/virtuals.d.js +0 -0
  61. package/dist/virtuals.d.ts +564 -0
  62. package/package.json +5 -1
  63. package/dist/components/Icon/iconType.d.ts +0 -2
  64. package/dist/components/ThemeToggle/ThemeToggle.astro +0 -21
  65. package/dist/components/ThemeToggle/themetoggle.css +0 -17
  66. package/dist/components/ThemeToggle/themetoggle.d.ts +0 -1
  67. package/dist/components/ThemeToggle/themetoggle.js +0 -4
  68. /package/dist/{components/Icon/iconType.js → events.d.js} +0 -0
@@ -1,13 +1,121 @@
1
1
  ---
2
- import { icons } from '@iconify-json/heroicons';
2
+ // @ts-ignore - This is a TypeGenerated Module, available in dev thanks to manual d.ts file - This comment is here because this causes a type-error during build
3
+ import { type AvailableIcons, type IconCollections, iconCollections } from 'studiocms:ui/icons';
4
+ // @ts-ignore - This is a TypeGenerated Module, available in dev thanks to manual d.ts file - This comment is here because this causes a type-error during build
5
+ import * as Icons from 'studiocms:ui/icons';
3
6
  import type { HTMLAttributes } from 'astro/types';
4
7
  import IconBase from './IconBase.astro';
5
- import { type HeroIconName } from './iconType.js';
8
+ import { StudioCMS_UI_IconError, errorHintBuilder } from './errors.js';
6
9
 
10
+ /**
11
+ * Props interface for the Icon component.
12
+ *
13
+ * @extends HTMLAttributes<'svg'>
14
+ *
15
+ * @property {AvailableIcons} name - The name of the icon to be displayed.
16
+ * @property {number} height - The height of the icon.
17
+ * @property {number} width - The width of the icon.
18
+ */
7
19
  interface Props extends HTMLAttributes<'svg'> {
8
- name: HeroIconName;
9
- height?: number;
10
- width?: number;
20
+ /**
21
+ * Name of the icon to be displayed.
22
+ */
23
+ name: AvailableIcons;
24
+
25
+ /**
26
+ * Height of the icon.
27
+ */
28
+ height: number;
29
+
30
+ /**
31
+ * Width of the icon.
32
+ */
33
+ width: number;
34
+ }
35
+
36
+ // Extract the props from the Astro component.
37
+ const { name: __name, height, width, ...rest } = Astro.props;
38
+
39
+ /**
40
+ * Splits the `__name` string by the colon (:) character.
41
+ * The resulting array is stored in the `_nameSplit` variable.
42
+ *
43
+ * Example:
44
+ * If `__name` is "prefix:suffix", `_nameSplit` will be ["prefix", "suffix"].
45
+ */
46
+ const _nameSplit = __name.split(':');
47
+
48
+ /**
49
+ * Checks if the icon name contains a colon and if the split name length is not equal to 1.
50
+ * If both conditions are met, throws a StudioCMS_UI_IconError with a message indicating an invalid icon name.
51
+ *
52
+ * @throws {StudioCMS_UI_IconError} Throws an error if the icon name is invalid.
53
+ * @param {string} __name - The name of the icon to be validated.
54
+ * @param {Array} _nameSplit - The split parts of the icon name.
55
+ * @param {Object} iconCollections - The available icon collections.
56
+ */
57
+ if (__name.includes(':') && _nameSplit.length !== 2) {
58
+ throw new StudioCMS_UI_IconError(
59
+ `Invalid icon name: ${__name}`,
60
+ errorHintBuilder({ iconCollections, prefix: '', iconName: __name })
61
+ );
62
+ }
63
+
64
+ /**
65
+ * Extracts the prefix from the `_nameSplit` array and casts it to the `IconCollections` type.
66
+ *
67
+ * @constant
68
+ * @type {IconCollections}
69
+ */
70
+ const prefix: IconCollections = _nameSplit[0] as IconCollections;
71
+
72
+ /**
73
+ * Extracts the second element from the `_nameSplit` array and casts it to the `AvailableIcons` type.
74
+ *
75
+ * @constant
76
+ * @type {AvailableIcons}
77
+ */
78
+ const name: AvailableIcons = _nameSplit[1] as AvailableIcons;
79
+
80
+ /**
81
+ * Retrieves the icon collection based on the provided prefix.
82
+ *
83
+ * @constant
84
+ * @param {string} prefix - The prefix used to identify the icon collection.
85
+ */
86
+ const iconCollection = Icons[prefix];
87
+
88
+ /**
89
+ * Validates the provided icon collection prefix and throws an error if it is invalid.
90
+ *
91
+ * @throws {StudioCMS_UI_IconError} If the prefix is not provided, not included in the icon collections, or if the icon collection is not defined.
92
+ *
93
+ * @param {string} prefix - The prefix of the icon collection to validate.
94
+ * @param {Array<string>} iconCollections - The list of valid icon collection prefixes.
95
+ * @param {Object} iconCollection - The icon collection object to validate.
96
+ * @param {string} name - The name of the icon.
97
+ */
98
+ if (!prefix || !iconCollections.includes(prefix) || !iconCollection) {
99
+ throw new StudioCMS_UI_IconError(
100
+ `Invalid icon collection: ${prefix}`,
101
+ errorHintBuilder({ iconCollections, prefix, iconName: name })
102
+ );
103
+ }
104
+
105
+ /**
106
+ * Throws an error if the icon name is invalid.
107
+ *
108
+ * @throws {StudioCMS_UI_IconError} If the icon name is not provided or invalid.
109
+ * @param {string} name - The name of the icon.
110
+ * @param {Object} iconCollections - The collections of available icons.
111
+ * @param {string} prefix - The prefix for the icon name.
112
+ * @param {Function} errorHintBuilder - A function to build error hints.
113
+ */
114
+ if (!name) {
115
+ throw new StudioCMS_UI_IconError(
116
+ `Invalid icon name: ${name}`,
117
+ errorHintBuilder({ iconCollections, prefix, iconName: name })
118
+ );
11
119
  }
12
120
  ---
13
- <IconBase iconCollection={icons} {...Astro.props} />
121
+ <IconBase {iconCollection} {name} {prefix} {...rest} {height} {width} />
@@ -1,9 +1,20 @@
1
1
  ---
2
2
  import type { IconifyJSON } from '@iconify/types';
3
- import { AstroError } from 'astro/errors';
4
3
  import type { HTMLAttributes } from 'astro/types';
5
4
  import { getIconData, iconToSVG, replaceIDs } from '../../utils/iconifyUtils.js';
5
+ import { StudioCMS_UI_IconError } from './errors.js';
6
6
 
7
+ /**
8
+ * Props interface for the IconBase component.
9
+ *
10
+ * @extends HTMLAttributes<'svg'>
11
+ *
12
+ * @property {IconifyJSON} iconCollection - The collection of icons.
13
+ * @property {string} name - The name of the icon from the collection.
14
+ * @property {string} prefix - The prefix of the icon collection.
15
+ * @property {number} height - The height of the icon.
16
+ * @property {number} width - The width of the icon.
17
+ */
7
18
  interface Props extends HTMLAttributes<'svg'> {
8
19
  /**
9
20
  * Collection of icons
@@ -25,54 +36,144 @@ interface Props extends HTMLAttributes<'svg'> {
25
36
  *
26
37
  * const { name, ...props } = Astro.props;
27
38
  * ---
28
- * <IconBase iconCollection={icons} {name} {...props} />
39
+ * <IconBase iconCollection={icons} {name} prefix={icons.prefix} {...props} />
29
40
  * ```
30
41
  */
31
42
  iconCollection: IconifyJSON;
43
+
32
44
  /**
33
45
  * Name of the icon from the collection
34
46
  */
35
47
  name: string;
48
+
49
+ /**
50
+ * Prefix of the icon collection
51
+ */
52
+ prefix: string;
53
+
36
54
  /**
37
55
  * Height of the icon in pixels
38
56
  */
39
- height?: number;
57
+ height: number;
58
+
40
59
  /**
41
60
  * Width of the icon in pixels
42
61
  */
43
- width?: number;
62
+ width: number;
44
63
  }
45
64
 
46
65
  const { iconCollection, name, ...props } = Astro.props;
47
66
 
67
+ /**
68
+ * Interface representing the attributes for an SVG element.
69
+ * Extends the HTMLAttributes interface for 'svg' elements.
70
+ *
71
+ * @interface SVGAttributes
72
+ * @extends {HTMLAttributes<'svg'>}
73
+ *
74
+ * @property {any} [key: string] - Allows any string index to be used as a property.
75
+ */
48
76
  interface SVGAttributes extends HTMLAttributes<'svg'> {
49
77
  // biome-ignore lint/suspicious/noExplicitAny: Allow any string index
50
78
  [key: string]: any;
51
79
  }
52
80
 
53
81
  const attributes = props as SVGAttributes;
82
+
83
+ /**
84
+ * Retrieves the icon data from the specified icon collection.
85
+ *
86
+ * @param {string} iconCollection - The collection of icons to retrieve from.
87
+ * @param {string} name - The name of the icon to retrieve.
88
+ * @returns {object} The data for the specified icon.
89
+ */
54
90
  const iconData = getIconData(iconCollection, name);
55
91
 
92
+ /**
93
+ * Throws an error if the icon data is missing from the collection.
94
+ *
95
+ * @throws {StudioCMS_UI_IconError} If the icon data is not found in the collection.
96
+ * @param {Object} iconData - The data for the icon.
97
+ * @param {string} name - The name of the icon.
98
+ * @param {Object} iconCollections - The collection of icons.
99
+ * @param {Object} iconCollection - The specific icon collection.
100
+ * @param {string} iconCollection.prefix - The prefix for the icon collection.
101
+ * @param {Function} errorHintBuilder - A function to build error hints.
102
+ */
56
103
  if (!iconData) {
57
- throw new AstroError(`Icon "${name}" is missing in collection`);
104
+ throw new StudioCMS_UI_IconError(
105
+ `Icon "${name}" is missing in ${iconCollection.prefix} collection`
106
+ );
58
107
  }
59
108
 
109
+ /**
110
+ * Converts icon data to SVG format and renders it with specified attributes.
111
+ *
112
+ * @param {Object} iconData - The data representing the icon to be converted to SVG.
113
+ * @param {Object} attributes - The attributes to apply to the SVG element.
114
+ * @param {number} [attributes.height=24] - The height of the SVG element. Defaults to 24 if not provided.
115
+ * @param {number} [attributes.width=24] - The width of the SVG element. Defaults to 24 if not provided.
116
+ * @returns {string} The rendered SVG data as a string.
117
+ */
60
118
  const renderData = iconToSVG(iconData, {
61
- height: attributes.height || 24,
62
- width: attributes.width || 24,
119
+ height: attributes.height || iconData.height || iconCollection.height || 24,
120
+ width: attributes.width || iconData.width || iconCollection.width || 24,
63
121
  });
64
122
 
123
+ /**
124
+ * Replaces IDs in the provided render data body.
125
+ *
126
+ * @param {string} renderData.body - The body of the render data where IDs need to be replaced.
127
+ * @returns {string} The body with replaced IDs.
128
+ */
65
129
  const body = replaceIDs(renderData.body);
66
130
 
131
+ /**
132
+ * Determines the value of the `renderAttribsHTML` variable based on the presence of the 'xlink:' substring in the `body` string.
133
+ * If 'xlink:' is found in the `body`, `renderAttribsHTML` is set to the XML namespace for xlink.
134
+ * Otherwise, it is set to an empty string.
135
+ *
136
+ * @example
137
+ * // Assuming `body` contains 'xlink:href="some-link"'
138
+ * let renderAttribsHTML = ' xmlns:xlink="http://www.w3.org/1999/xlink"';
139
+ *
140
+ * @example
141
+ * // Assuming `body` does not contain 'xlink:'
142
+ * let renderAttribsHTML = '';
143
+ */
67
144
  let renderAttribsHTML =
68
145
  body.indexOf('xlink:') === -1 ? '' : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
69
146
 
147
+ /**
148
+ * Iterates over the `attributes` object and constructs a string of HTML attributes.
149
+ * Each attribute is added to the `renderAttribsHTML` string in the format ` key="value"`.
150
+ *
151
+ * @param {Object} attributes - An object containing key-value pairs of HTML attributes.
152
+ * @param {string} renderAttribsHTML - A string that accumulates the HTML attributes.
153
+ */
70
154
  for (const attr in attributes) {
71
155
  renderAttribsHTML += ` ${attr}="${attributes[attr]}"`;
72
156
  }
73
157
 
158
+ /**
159
+ * Extracts the `viewBox` attribute from the `renderData` object.
160
+ *
161
+ * @constant
162
+ * @type {string}
163
+ * @memberof IconBase
164
+ */
74
165
  const viewBox = renderData.attributes.viewBox;
75
166
 
167
+ /**
168
+ * Generates an SVG element as a string with specified attributes and content.
169
+ *
170
+ * @param {Object} attributes - The attributes for the SVG element.
171
+ * @param {number} [attributes.height=24] - The minimum height of the SVG element in pixels.
172
+ * @param {string} renderAttribsHTML - The HTML string of additional attributes to be added to the SVG element.
173
+ * @param {string} [viewBox] - The viewBox attribute for the SVG element, if provided.
174
+ * @param {string} body - The inner content of the SVG element.
175
+ * @returns {string} The generated SVG element as a string.
176
+ */
76
177
  const svg = `<svg style="min-width: ${attributes.height || 24}px" xmlns="http://www.w3.org/2000/svg"${renderAttribsHTML}${viewBox && ` viewbox="${viewBox}"`}>${body}</svg>`;
77
178
  ---
78
179
  <Fragment set:html={svg} />
@@ -0,0 +1,29 @@
1
+ import type { iconCollections as _iconCollections } from 'studiocms:ui/icons';
2
+ import { AstroError } from 'astro/errors';
3
+ /**
4
+ * Custom error class for handling errors related to StudioCMS UI Icons.
5
+ *
6
+ * @extends {AstroError}
7
+ *
8
+ * @property {string} name - The name of the error, set to 'StudioCMS UI Icon Error'.
9
+ * @property {string} hint - A hint message suggesting to check the Icon Collection for the required icon.
10
+ * @property {const} type - The type of the error, set to 'AstroUserError'.
11
+ */
12
+ export declare class StudioCMS_UI_IconError extends AstroError {
13
+ name: string;
14
+ type: "AstroUserError";
15
+ }
16
+ /**
17
+ * Builds an error hint message for invalid or missing icons.
18
+ *
19
+ * @param data - An object containing the following properties:
20
+ * @param data.iconCollections - An array of valid icon collections.
21
+ * @param data.prefix - The prefix of the icon name.
22
+ * @param data.iconName - The name of the icon.
23
+ * @returns A string containing the error hint message.
24
+ */
25
+ export declare function errorHintBuilder(data: {
26
+ iconCollections: typeof _iconCollections;
27
+ prefix: string | undefined;
28
+ iconName: string | undefined;
29
+ }): string;
@@ -0,0 +1,25 @@
1
+ import { AstroError } from "astro/errors";
2
+ class StudioCMS_UI_IconError extends AstroError {
3
+ name = "@studiocms/ui Icon Error";
4
+ type = "AstroUserError";
5
+ }
6
+ function receivedIcon(prefix, iconName) {
7
+ if (!prefix && !iconName) {
8
+ return "undefined";
9
+ }
10
+ if (!prefix) {
11
+ return `${iconName}`;
12
+ }
13
+ if (!iconName) {
14
+ return `${prefix}:undefined`;
15
+ }
16
+ return `${prefix}:${iconName}`;
17
+ }
18
+ function errorHintBuilder(data) {
19
+ const { iconCollections, prefix, iconName } = data;
20
+ return `Valid icon collections: ${iconCollections.join(", ")}. Received: "${receivedIcon(prefix, iconName)}", Icon is either missing or invalid.`;
21
+ }
22
+ export {
23
+ StudioCMS_UI_IconError,
24
+ errorHintBuilder
25
+ };
@@ -7,7 +7,7 @@
7
7
  .sui-input-label.disabled {
8
8
  opacity: 0.5;
9
9
  pointer-events: none;
10
- color: hsl(var(--text-muted));
10
+ color: var(--text-muted);
11
11
  }
12
12
  .label {
13
13
  font-size: 14px;
@@ -15,24 +15,24 @@
15
15
  .sui-input {
16
16
  padding: .5rem 1rem;
17
17
  border-radius: var(--radius-md);
18
- border: 1px solid hsl(var(--border));
19
- background: hsl(var(--background-step-2));
20
- color: hsl(var(--text-normal));
18
+ border: 1px solid var(--border);
19
+ background: var(--background-step-2);
20
+ color: var(--text-normal);
21
21
  transition: all .15s ease;
22
22
  }
23
23
  .sui-input:hover {
24
- background: hsl(var(--background-step-3));
24
+ background: var(--background-step-3);
25
25
  }
26
26
  .sui-input:active,
27
27
  .sui-input:focus {
28
- border: 1px solid hsl(var(--primary-base));
28
+ border: 1px solid var(--primary-base);
29
29
  outline: none;
30
- background: hsl(var(--background-step-2));
30
+ background: var(--background-step-2);
31
31
  }
32
32
  .disabled .sui-input:active {
33
- border: 1px solid hsl(var(--border));
33
+ border: 1px solid var(--border);
34
34
  }
35
35
  .req-star {
36
- color: hsl(var(--danger-base));
36
+ color: var(--danger-base);
37
37
  font-weight: 700;
38
38
  }
@@ -65,7 +65,7 @@ const {
65
65
  <slot name="header" />
66
66
  {(dismissable || (!cancelButton && !actionButton)) && (
67
67
  <button class="x-mark-container" id={`${id}-btn-x`}>
68
- <Icon name="x-mark" width={24} height={24} class={'dismiss-icon'} />
68
+ <Icon name="heroicons:x-mark" width={24} height={24} class={'dismiss-icon'} />
69
69
  </button>
70
70
  )}
71
71
  </div>
@@ -1,8 +1,8 @@
1
1
  .sui-modal {
2
- border: 1px solid hsl(var(--border));
2
+ border: 1px solid var(--border);
3
3
  border-radius: var(--radius-md);
4
4
  padding: 1.5rem;
5
- box-shadow: 0px 6px 8px hsl(var(--shadow));
5
+ box-shadow: 0px 4px 8px var(--shadow);
6
6
  animation: hide .25s ease;
7
7
  overflow: visible;
8
8
  margin: auto;
@@ -50,10 +50,10 @@ body:has(.sui-modal[open]) {
50
50
  border-radius: var(--radius-sm);
51
51
  }
52
52
  .x-mark-container:hover {
53
- background-color: hsl(var(--default-base));
53
+ background-color: var(--default-base);
54
54
  }
55
55
  .x-mark-container:focus-visible {
56
- outline: 2px solid hsl(var(--text-normal));
56
+ outline: 2px solid var(--text-normal);
57
57
  outline-offset: 2px;
58
58
  }
59
59
  .sui-modal-footer {
@@ -1,7 +1,7 @@
1
1
  .sui-progress {
2
2
  width: 100%;
3
3
  height: 1rem;
4
- border: 1px solid hsl(var(--border));
4
+ border: 1px solid var(--border);
5
5
  border-radius: var(--radius-sm);
6
6
  overflow: hidden;
7
7
  }
@@ -10,20 +10,20 @@
10
10
  width: 0;
11
11
  transition: all .75s ease;
12
12
  border-radius: var(--radius-sm);
13
- background-color: hsl(var(--primary-base));
13
+ background-color: var(--primary-base);
14
14
  }
15
15
  .sui-progress.success .sui-progress-slider {
16
- background-color: hsl(var(--success-base));
16
+ background-color: var(--success-base);
17
17
  }
18
18
  .sui-progress.warning .sui-progress-slider {
19
- background-color: hsl(var(--warning-base));
19
+ background-color: var(--warning-base);
20
20
  }
21
21
  .sui-progress.danger .sui-progress-slider {
22
- background-color: hsl(var(--danger-base));
22
+ background-color: var(--danger-base);
23
23
  }
24
24
  .sui-progress.info .sui-progress-slider {
25
- background-color: hsl(var(--info-base));
25
+ background-color: var(--info-base);
26
26
  }
27
27
  .sui-progress.monochrome .sui-progress-slider {
28
- background-color: hsl(var(--mono-base));
28
+ background-color: var(--mono-base);
29
29
  }
@@ -5,15 +5,15 @@
5
5
  }
6
6
  .sui-radio-container.disabled {
7
7
  opacity: 0.5;
8
- color: hsl(var(--text-muted));
8
+ color: var(--text-muted);
9
9
  }
10
10
  .sui-radio-label.disabled {
11
11
  opacity: 0.5;
12
- color: hsl(var(--text-muted));
12
+ color: var(--text-muted);
13
13
  pointer-events: none;
14
14
  }
15
15
  .req-star {
16
- color: hsl(var(--danger-base));
16
+ color: var(--danger-base);
17
17
  font-weight: 700;
18
18
  }
19
19
  .sui-radio-inputs {
@@ -32,39 +32,39 @@
32
32
  align-items: center;
33
33
  }
34
34
  .sui-radio-label:hover .sui-radio-box {
35
- outline-color: hsl(var(--default-hover));
35
+ outline-color: var(--default-hover);
36
36
  }
37
37
  .sui-radio-container:not(.disabled) .sui-radio-label:active .sui-radio-box {
38
- outline-color: hsl(var(--default-active));
38
+ outline-color: var(--default-active);
39
39
  scale: 0.9;
40
40
  }
41
41
  .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
42
- background-color: hsl(var(--text-normal));
43
- outline-color: hsl(var(--text-normal));
42
+ background-color: var(--text-normal);
43
+ outline-color: var(--text-normal);
44
44
  }
45
45
  .sui-radio-container.primary .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
46
- background-color: hsl(var(--primary-base));
47
- outline-color: hsl(var(--primary-base));
46
+ background-color: var(--primary-base);
47
+ outline-color: var(--primary-base);
48
48
  }
49
49
  .sui-radio-container.success .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
50
- background-color: hsl(var(--success-base));
51
- outline-color: hsl(var(--success-base));
50
+ background-color: var(--success-base);
51
+ outline-color: var(--success-base);
52
52
  }
53
53
  .sui-radio-container.warning .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
54
- background-color: hsl(var(--warning-base));
55
- outline-color: hsl(var(--warning-base));
54
+ background-color: var(--warning-base);
55
+ outline-color: var(--warning-base);
56
56
  }
57
57
  .sui-radio-container.danger .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
58
- background-color: hsl(var(--danger-base));
59
- outline-color: hsl(var(--danger-base));
58
+ background-color: var(--danger-base);
59
+ outline-color: var(--danger-base);
60
60
  }
61
61
  .sui-radio-container.info .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
62
- background-color: hsl(var(--info-base));
63
- outline-color: hsl(var(--info-base));
62
+ background-color: var(--info-base);
63
+ outline-color: var(--info-base);
64
64
  }
65
65
  .sui-radio-container.mono .sui-radio-label:has(.sui-radio-toggle:checked) .sui-radio-box {
66
- background-color: hsl(var(--mono-base));
67
- outline-color: hsl(var(--mono-base));
66
+ background-color: var(--mono-base);
67
+ outline-color: var(--mono-base);
68
68
  }
69
69
  .sui-radio-box-container {
70
70
  width: 20px;
@@ -79,12 +79,12 @@
79
79
  width: 12px;
80
80
  height: 12px;
81
81
  border-radius: var(--radius-full);
82
- outline: 1px solid hsl(var(--default-base));
82
+ outline: 1px solid var(--default-base);
83
83
  outline-offset: 4px;
84
84
  transition: all .15s ease;
85
85
  }
86
86
  .sui-radio-box:focus-visible {
87
- outline-color: hsl(var(--text-normal)) !important;
87
+ outline-color: var(--text-normal) !important;
88
88
  }
89
89
  .sui-radio-toggle {
90
90
  width: 0;
@@ -152,7 +152,7 @@ const defaultLabel = selected
152
152
  label={label || ''}
153
153
  isRequired={isRequired || false}
154
154
  />
155
- <Icon name="chevron-up-down" class="sui-search-select-indicator" width={24} height={24} />
155
+ <Icon name="heroicons:chevron-up-down" class="sui-search-select-indicator" width={24} height={24} />
156
156
  </div>
157
157
  <div class="sui-search-select-dropdown">
158
158
  <ul class="sui-search-select-dropdown-list" role="listbox" id={`${name}-dropdown`}>
@@ -212,7 +212,7 @@ const defaultLabel = selected
212
212
  <div class="sui-search-select-badge-container">
213
213
  {
214
214
  ((selected ?? []) as SearchSelectOption[]).map((s) => s &&
215
- <Badge class="sui-search-select-badge" data-value={s.value} size="sm" label={s.label} iconPosition="right" icon="x-mark" />
215
+ <Badge class="sui-search-select-badge" data-value={s.value} size="sm" label={s.label} iconPosition="right" icon="heroicons:x-mark" />
216
216
  )
217
217
  }
218
218
  </div>