@ogcio/design-system-react 1.29.0 → 1.31.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 (109) hide show
  1. package/README.md +11 -33
  2. package/dist/alert/variants.d.ts +78 -2
  3. package/dist/atoms/DsButton.d.ts +194 -0
  4. package/dist/atoms/DsButton.js +330 -0
  5. package/dist/atoms/InsetText.d.ts +14 -0
  6. package/dist/atoms/InsetText.js +17 -0
  7. package/dist/atoms/icons/Close.d.ts +3 -0
  8. package/dist/atoms/icons/Close.js +23 -0
  9. package/dist/atoms/icons/KeyboardArrowDown.d.ts +3 -0
  10. package/dist/atoms/icons/KeyboardArrowDown.js +23 -0
  11. package/dist/atoms/icons/KeyboardArrowUp.d.ts +3 -0
  12. package/dist/atoms/icons/KeyboardArrowUp.js +23 -0
  13. package/dist/atoms/icons/Visibility.d.ts +3 -0
  14. package/dist/atoms/icons/Visibility.js +23 -0
  15. package/dist/atoms/icons/VisibilityOff.d.ts +3 -0
  16. package/dist/atoms/icons/VisibilityOff.js +23 -0
  17. package/dist/atoms/icons/index.d.ts +6 -0
  18. package/dist/atoms/icons/index.js +12 -0
  19. package/dist/atoms/icons/logos/LogoBlack.d.ts +3 -0
  20. package/dist/atoms/icons/logos/LogoBlack.js +327 -0
  21. package/dist/atoms/icons/logos/LogoGoldGreen.d.ts +3 -0
  22. package/dist/atoms/icons/logos/LogoGoldGreen.js +327 -0
  23. package/dist/atoms/icons/logos/LogoGoldWhite.d.ts +3 -0
  24. package/dist/atoms/icons/logos/LogoGoldWhite.js +87 -0
  25. package/dist/atoms/icons/logos/LogoHarpBlack.d.ts +3 -0
  26. package/dist/atoms/icons/logos/LogoHarpBlack.js +68 -0
  27. package/dist/atoms/icons/logos/LogoHarpWhite.d.ts +3 -0
  28. package/dist/{assets/logos/LogoHarpBlack.js → atoms/icons/logos/LogoHarpWhite.js} +33 -31
  29. package/dist/atoms/icons/logos/LogoWhite.d.ts +3 -0
  30. package/dist/atoms/icons/logos/LogoWhite.js +327 -0
  31. package/dist/atoms/icons/logos/index.d.ts +6 -0
  32. package/dist/atoms/icons/logos/index.js +14 -0
  33. package/dist/atoms/icons/types.d.ts +10 -0
  34. package/dist/atoms/icons/types.js +1 -0
  35. package/dist/atoms/index.d.ts +3 -0
  36. package/dist/atoms/index.js +16 -0
  37. package/dist/autocomplete/autocomplete.js +131 -115
  38. package/dist/blockquote/blockquote.d.ts +4 -1
  39. package/dist/blockquote/blockquote.js +18 -4
  40. package/dist/breadcrumbs/breadcrumbs.js +54 -33
  41. package/dist/button-group/button-group.js +31 -28
  42. package/dist/character-count/character-count.js +5 -5
  43. package/dist/chip/chip.js +41 -19
  44. package/dist/combo-box/combo-box.js +6 -13
  45. package/dist/combo-box/dropdown-item.js +39 -40
  46. package/dist/cookie-banner/cookie-banner.js +28 -20
  47. package/dist/data-table/data-table-footer.js +57 -51
  48. package/dist/data-table/data-table-header.d.ts +7 -7
  49. package/dist/data-table/data-table-header.js +97 -110
  50. package/dist/data-table/data-table-selected-rows.d.ts +1 -0
  51. package/dist/data-table/data-table-selected-rows.js +15 -19
  52. package/dist/details/details.js +43 -23
  53. package/dist/drawer/drawer.js +35 -32
  54. package/dist/footer/footer.js +54 -46
  55. package/dist/forms/form-field/form-field.d.ts +2 -2
  56. package/dist/forms/form-field/form-field.js +40 -30
  57. package/dist/forms/form-field/types.d.ts +10 -3
  58. package/dist/header/components/header-slot.js +33 -32
  59. package/dist/header/header-legacy.js +8 -8
  60. package/dist/header/variants.d.ts +220 -20
  61. package/dist/heading/heading.d.ts +70 -2
  62. package/dist/hooks/use-aria-hider.d.ts +1 -1
  63. package/dist/hooks/use-aria-hider.js +14 -13
  64. package/dist/hooks/use-breakpoint.js +15 -12
  65. package/dist/hooks/use-focus-trap.d.ts +1 -1
  66. package/dist/hooks/use-focus-trap.js +179 -179
  67. package/dist/icon/icon.d.ts +10 -0
  68. package/dist/icon/icon.js +64 -52
  69. package/dist/icon/icons.d.ts +1 -1
  70. package/dist/icons/index.d.ts +1 -0
  71. package/dist/icons/index.js +12 -0
  72. package/dist/index.d.ts +1 -0
  73. package/dist/index.js +144 -142
  74. package/dist/input-file/input-file.js +15 -12
  75. package/dist/input-password/input-password.js +13 -12
  76. package/dist/input-text/input-text.js +18 -16
  77. package/dist/label/label.d.ts +43 -0
  78. package/dist/label/label.js +7 -6
  79. package/dist/logos/index.d.ts +1 -0
  80. package/dist/logos/index.js +14 -0
  81. package/dist/modal/modal.js +125 -127
  82. package/dist/popover/popover.js +67 -64
  83. package/dist/score-select/score-select.js +20 -20
  84. package/dist/select/select-next.js +45 -45
  85. package/dist/spinner/spinner.d.ts +30 -2
  86. package/dist/styles.css +12 -2
  87. package/dist/table/table-row.js +14 -7
  88. package/dist/table/table.d.ts +22 -2
  89. package/dist/tabs/tab-item.d.ts +2 -2
  90. package/dist/tabs/tab-panel.js +6 -6
  91. package/dist/tabs/tabs.js +19 -19
  92. package/dist/text-input/text-input.d.ts +1 -1
  93. package/dist/textarea/textarea.js +27 -28
  94. package/dist/toast/ds-toast.d.ts +78 -2
  95. package/fonts.css +10 -0
  96. package/package.json +17 -12
  97. package/dist/assets/logos/LogoBlack.d.ts +0 -3
  98. package/dist/assets/logos/LogoBlack.js +0 -322
  99. package/dist/assets/logos/LogoGoldGreen.d.ts +0 -3
  100. package/dist/assets/logos/LogoGoldGreen.js +0 -322
  101. package/dist/assets/logos/LogoGoldWhite.d.ts +0 -3
  102. package/dist/assets/logos/LogoGoldWhite.js +0 -82
  103. package/dist/assets/logos/LogoHarpBlack.d.ts +0 -3
  104. package/dist/assets/logos/LogoHarpWhite.d.ts +0 -3
  105. package/dist/assets/logos/LogoHarpWhite.js +0 -60
  106. package/dist/assets/logos/LogoWhite.d.ts +0 -3
  107. package/dist/assets/logos/LogoWhite.js +0 -322
  108. package/dist/assets/logos/index.d.ts +0 -6
  109. package/dist/assets/logos/index.js +0 -14
package/README.md CHANGED
@@ -1,6 +1,4 @@
1
- # govie-react
2
-
3
- **This library should only be imported for departments actively working with the core design system team during its development. Do not use this library if you are not part of this development process, and contact the design system team instead if you interested in its use.**
1
+ # Government of Ireland Design System – React
4
2
 
5
3
  Welcome to the Government of Ireland Design System React component library, a collection of reusable React components designed to help you build modern React web applications utilising the Government of Ireland Design System.
6
4
 
@@ -12,20 +10,6 @@ To install the library, use the following command:
12
10
  npm install @ogcio/design-system-react @ogcio/theme-govie
13
11
  ```
14
12
 
15
- ### Pinning packages
16
-
17
- We **strongly recommend** that you pin the Government of Ireland Design System packages, so that any regressions are not automatically introduced during development. Regressions that will only be discoverable at runtime.
18
-
19
- **Upgrades should be explicit version updates** in the `package.json` and then your application should be regression tested:
20
-
21
- ```diff
22
- "dependencies": {
23
- - "@ogcio/theme-govie": "^1.4.1",
24
- + "@ogcio/theme-govie": "1.4.1",
25
- - "@ogcio/design-system-react": "^1.10.0",
26
- + "@ogcio/design-system-react": "1.10.0"
27
- ```
28
-
29
13
  ### Usage
30
14
 
31
15
  Import the Government of Ireland `theme.css` from the `@ogcio/theme-govie` theme package at the entry point of your application, for example:
@@ -75,11 +59,18 @@ function MyComponent() {
75
59
 
76
60
  #### Font Loading
77
61
 
78
- The Government of Ireland Design System uses the [Lato](https://fonts.google.com/specimen/Lato) Google font. While the design system includes font loading through `styles.css`, **in Next.js 16 applications, CSS `@import` statements do not load fonts properly**. Therefore, you must explicitly load fonts using `next/font/google` for optimal font loading.
62
+ The Government of Ireland Design System uses the [Lato](https://fonts.google.com/specimen/Lato) font family via [`@fontsource/lato`](https://fontsource.org/fonts/lato). Lato fonts are included in `styles.css` no additional font import is needed.
79
63
 
80
- **Recommended approach for Next.js (Primary):**
64
+ Your bundler (Vite, webpack, etc.) resolves the `@fontsource/lato` imports and bundles the font files automatically.
65
+
66
+ A standalone `fonts.css` is also available if you need to import fonts separately:
67
+
68
+ ```jsx
69
+ import '@ogcio/design-system-react/fonts.css';
70
+ ```
71
+
72
+ **Next.js:** We recommend using [`next/font/google`](https://nextjs.org/docs/app/getting-started/fonts) to load the Lato font family for optimal performance.
81
73
 
82
- For Next.js applications, we strongly recommend using [`next/font/google`](https://nextjs.org/docs/app/getting-started/fonts) as it provides optimal font loading with automatic optimisation.
83
74
 
84
75
  ```tsx
85
76
  // app/layout.tsx (App Router)
@@ -167,16 +158,3 @@ resources: {
167
158
 
168
159
  Note: Each component in the design system documents its relevant i18n keys under an **i18n Keys** heading, if available, for example [Pagination i18n Keys](http://ds.blocks.gov.ie/components/library/pagination/#i18n-keys). Be sure to refer to this section when using or implementing a component to ensure all necessary translations are provided.
169
160
 
170
- ## Contribution
171
-
172
- We welcome contributions! If you have suggestions for improvements, please feel free to open an issue or submit a pull request.
173
-
174
- ## Feedback
175
-
176
- Your feedback is invaluable to us. Please share your thoughts and experiences to help us make this library better.
177
-
178
- ## Roadmap
179
-
180
- - Alpha: Frequent updates with breaking changes.
181
- - Beta: Stabilizing the API and focusing on bug fixes.
182
- - 1.0: Stable release with a solid API.
@@ -23,7 +23,45 @@ export declare const alertVariants: import('tailwind-variants').TVReturnType<{
23
23
  container: string;
24
24
  heading: string;
25
25
  dismiss: string;
26
- }, undefined, TVConfig<V, EV>, {
26
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
27
+ variant: {
28
+ info: {
29
+ base: string;
30
+ baseDismissible: string;
31
+ };
32
+ danger: {
33
+ base: string;
34
+ baseDismissible: string;
35
+ };
36
+ success: {
37
+ base: string;
38
+ baseDismissible: string;
39
+ };
40
+ warning: {
41
+ base: string;
42
+ baseDismissible: string;
43
+ };
44
+ };
45
+ }, {
46
+ variant: {
47
+ info: {
48
+ base: string;
49
+ baseDismissible: string;
50
+ };
51
+ danger: {
52
+ base: string;
53
+ baseDismissible: string;
54
+ };
55
+ success: {
56
+ base: string;
57
+ baseDismissible: string;
58
+ };
59
+ warning: {
60
+ base: string;
61
+ baseDismissible: string;
62
+ };
63
+ };
64
+ }>, {
27
65
  variant: {
28
66
  info: {
29
67
  base: string;
@@ -73,4 +111,42 @@ export declare const alertVariants: import('tailwind-variants').TVReturnType<{
73
111
  container: string;
74
112
  heading: string;
75
113
  dismiss: string;
76
- }, undefined, TVConfig<V, EV>, unknown, unknown, undefined>>;
114
+ }, undefined, import('tailwind-variants/dist/config.js').TVConfig<{
115
+ variant: {
116
+ info: {
117
+ base: string;
118
+ baseDismissible: string;
119
+ };
120
+ danger: {
121
+ base: string;
122
+ baseDismissible: string;
123
+ };
124
+ success: {
125
+ base: string;
126
+ baseDismissible: string;
127
+ };
128
+ warning: {
129
+ base: string;
130
+ baseDismissible: string;
131
+ };
132
+ };
133
+ }, {
134
+ variant: {
135
+ info: {
136
+ base: string;
137
+ baseDismissible: string;
138
+ };
139
+ danger: {
140
+ base: string;
141
+ baseDismissible: string;
142
+ };
143
+ success: {
144
+ base: string;
145
+ baseDismissible: string;
146
+ };
147
+ warning: {
148
+ base: string;
149
+ baseDismissible: string;
150
+ };
151
+ };
152
+ }>, unknown, unknown, undefined>>;
@@ -0,0 +1,194 @@
1
+ /**
2
+ * Mitosis automatically generates this file.
3
+ * Do not edit this file directly.
4
+ * The file source is in `packages/core/atoms/DsButton.lite.tsx`
5
+ */
6
+ import * as React from 'react';
7
+ type Props = {
8
+ id?: string;
9
+ variant?: (typeof Variant)[keyof typeof Variant];
10
+ appearance?: (typeof Appearance)[keyof typeof Appearance];
11
+ size?: (typeof Size)[keyof typeof Size];
12
+ children?: any;
13
+ disabled?: boolean;
14
+ className?: string;
15
+ onClick?: (event: any) => void;
16
+ onFocus?: (event: any) => void;
17
+ onBlur?: (event: any) => void;
18
+ onKeyDown?: (event: any) => void;
19
+ onKeyUp?: (event: any) => void;
20
+ ariaLabel?: string;
21
+ ariaLabelledBy?: string;
22
+ ariaDescribedBy?: string;
23
+ ariaPressed?: boolean | 'mixed';
24
+ ariaExpanded?: boolean;
25
+ ariaControls?: string;
26
+ ariaHasPopup?: 'menu' | 'listbox' | 'dialog' | 'grid' | 'tree' | boolean;
27
+ ariaBusy?: boolean;
28
+ role?: string;
29
+ type?: 'button' | 'submit' | 'reset';
30
+ form?: string;
31
+ value?: string;
32
+ tabIndex?: number;
33
+ dataTestId?: string;
34
+ dataTestid?: string;
35
+ ref?: any;
36
+ };
37
+ export declare const Variant: {
38
+ readonly PRIMARY: "primary";
39
+ readonly SECONDARY: "secondary";
40
+ readonly FLAT: "flat";
41
+ };
42
+ export declare const Appearance: {
43
+ readonly DEFAULT: "default";
44
+ readonly DARK: "dark";
45
+ readonly LIGHT: "light";
46
+ };
47
+ export declare const Size: {
48
+ readonly SMALL: "small";
49
+ readonly MEDIUM: "medium";
50
+ readonly LARGE: "large";
51
+ };
52
+ export declare const styles: import('tailwind-variants').TVReturnType<{
53
+ variant: {
54
+ primary: string[];
55
+ secondary: never[];
56
+ flat: string[];
57
+ };
58
+ appearance: {
59
+ default: string;
60
+ light: string;
61
+ dark: string;
62
+ };
63
+ size: {
64
+ small: string;
65
+ medium: string;
66
+ large: string;
67
+ };
68
+ disabled: {
69
+ true: string;
70
+ false: string;
71
+ };
72
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
73
+ variant: {
74
+ primary: string[];
75
+ secondary: never[];
76
+ flat: string[];
77
+ };
78
+ appearance: {
79
+ default: string;
80
+ light: string;
81
+ dark: string;
82
+ };
83
+ size: {
84
+ small: string;
85
+ medium: string;
86
+ large: string;
87
+ };
88
+ disabled: {
89
+ true: string;
90
+ false: string;
91
+ };
92
+ }, {
93
+ variant: {
94
+ primary: string[];
95
+ secondary: never[];
96
+ flat: string[];
97
+ };
98
+ appearance: {
99
+ default: string;
100
+ light: string;
101
+ dark: string;
102
+ };
103
+ size: {
104
+ small: string;
105
+ medium: string;
106
+ large: string;
107
+ };
108
+ disabled: {
109
+ true: string;
110
+ false: string;
111
+ };
112
+ }>, {
113
+ variant: {
114
+ primary: string[];
115
+ secondary: never[];
116
+ flat: string[];
117
+ };
118
+ appearance: {
119
+ default: string;
120
+ light: string;
121
+ dark: string;
122
+ };
123
+ size: {
124
+ small: string;
125
+ medium: string;
126
+ large: string;
127
+ };
128
+ disabled: {
129
+ true: string;
130
+ false: string;
131
+ };
132
+ }, undefined, import('tailwind-variants').TVReturnType<{
133
+ variant: {
134
+ primary: string[];
135
+ secondary: never[];
136
+ flat: string[];
137
+ };
138
+ appearance: {
139
+ default: string;
140
+ light: string;
141
+ dark: string;
142
+ };
143
+ size: {
144
+ small: string;
145
+ medium: string;
146
+ large: string;
147
+ };
148
+ disabled: {
149
+ true: string;
150
+ false: string;
151
+ };
152
+ }, undefined, string[], import('tailwind-variants/dist/config.js').TVConfig<{
153
+ variant: {
154
+ primary: string[];
155
+ secondary: never[];
156
+ flat: string[];
157
+ };
158
+ appearance: {
159
+ default: string;
160
+ light: string;
161
+ dark: string;
162
+ };
163
+ size: {
164
+ small: string;
165
+ medium: string;
166
+ large: string;
167
+ };
168
+ disabled: {
169
+ true: string;
170
+ false: string;
171
+ };
172
+ }, {
173
+ variant: {
174
+ primary: string[];
175
+ secondary: never[];
176
+ flat: string[];
177
+ };
178
+ appearance: {
179
+ default: string;
180
+ light: string;
181
+ dark: string;
182
+ };
183
+ size: {
184
+ small: string;
185
+ medium: string;
186
+ large: string;
187
+ };
188
+ disabled: {
189
+ true: string;
190
+ false: string;
191
+ };
192
+ }>, unknown, unknown, undefined>>;
193
+ declare const DsButton: React.ForwardRefExoticComponent<Omit<Props, "ref"> & React.RefAttributes<any>>;
194
+ export default DsButton;
@@ -0,0 +1,330 @@
1
+ "use client";
2
+ import { jsx as n } from "react/jsx-runtime";
3
+ import { forwardRef as s } from "react";
4
+ import { c } from "../index-CB-zPpNk.js";
5
+ const r = {
6
+ PRIMARY: "primary",
7
+ SECONDARY: "secondary",
8
+ FLAT: "flat"
9
+ }, i = {
10
+ DEFAULT: "default",
11
+ DARK: "dark",
12
+ LIGHT: "light"
13
+ }, o = {
14
+ SMALL: "small",
15
+ MEDIUM: "medium",
16
+ LARGE: "large"
17
+ }, g = c({
18
+ base: [
19
+ "gi-font-primary",
20
+ "gi-border-solid",
21
+ "gi-border-sm",
22
+ "gi-gap-2",
23
+ "gi-flex",
24
+ "gi-rounded-sm",
25
+ "gi-items-center",
26
+ //disabled
27
+ "disabled:gi-cursor-not-allowed",
28
+ "disabled:gi-pointer-events-none",
29
+ // focus
30
+ "focus:gi-outline",
31
+ "focus:gi-outline-sm",
32
+ "focus:gi-outline-color-shadow-intent-focus-default",
33
+ "focus:gi-outline-offset-0",
34
+ "focus:gi-border-solid",
35
+ "focus:gi-border-color-border-intent-focus-default",
36
+ "focus:gi-border-sm",
37
+ "focus:gi-rounded-sm"
38
+ ],
39
+ variants: {
40
+ variant: {
41
+ primary: [
42
+ "gi-border-transparent",
43
+ "focus:gi-shadow-color-border-intent-focus-light",
44
+ "focus:gi-shadow-[inset_0_0_0_2px]"
45
+ ],
46
+ secondary: [],
47
+ flat: ["gi-border-base-transparent"]
48
+ },
49
+ appearance: {
50
+ default: "",
51
+ light: "",
52
+ dark: ""
53
+ },
54
+ size: {
55
+ small: "gi-h-8 gi-px-2 gi-py-1.5 gi-text-xs",
56
+ medium: "gi-h-10 gi-px-3 gi-py-2 gi-text-sm",
57
+ large: "gi-h-12 gi-px-4 gi-py-3 gi-text-2md"
58
+ },
59
+ disabled: {
60
+ true: "",
61
+ false: ""
62
+ }
63
+ },
64
+ compoundVariants: [
65
+ {
66
+ variant: "primary",
67
+ appearance: "default",
68
+ disabled: !1,
69
+ class: [
70
+ "gi-text-color-text-tone-primary-fill-default",
71
+ "gi-bg-color-surface-tone-primary-fill-default",
72
+ "gi-stroke-color-text-tone-primary-fill-default",
73
+ "hover:gi-bg-color-surface-tone-primary-fill-hover",
74
+ "focus:gi-bg-color-surface-tone-primary-fill-hover"
75
+ ]
76
+ },
77
+ {
78
+ variant: "primary",
79
+ appearance: "light",
80
+ disabled: !1,
81
+ class: [
82
+ "gi-text-color-text-tone-light-fill-default",
83
+ "gi-stroke-color-text-tone-light-fill-default",
84
+ "gi-bg-color-surface-tone-light-fill-default",
85
+ "hover:gi-bg-color-surface-tone-light-fill-hover",
86
+ "focus:gi-bg-color-surface-tone-light-fill-hover"
87
+ ]
88
+ },
89
+ {
90
+ variant: "primary",
91
+ appearance: "dark",
92
+ disabled: !1,
93
+ class: [
94
+ "gi-text-color-text-tone-dark-fill-default",
95
+ "gi-stroke-color-text-tone-dark-fill-default",
96
+ "gi-bg-color-surface-tone-dark-fill-default",
97
+ "hover:gi-bg-color-surface-tone-dark-fill-hover",
98
+ "focus:gi-bg-color-surface-tone-dark-fill-hover"
99
+ ]
100
+ },
101
+ {
102
+ variant: "primary",
103
+ appearance: "default",
104
+ disabled: !0,
105
+ class: [
106
+ "gi-bg-color-surface-tone-primary-fill-disabled",
107
+ "gi-text-color-text-tone-primary-fill-disabled",
108
+ "gi-stroke-color-text-tone-primary-fill-disabled"
109
+ ]
110
+ },
111
+ {
112
+ variant: "primary",
113
+ appearance: "light",
114
+ disabled: !0,
115
+ class: [
116
+ "gi-bg-color-surface-tone-light-fill-disabled",
117
+ "gi-text-color-text-tone-light-fill-disabled",
118
+ "gi-stroke-color-text-tone-light-fill-disabled"
119
+ ]
120
+ },
121
+ {
122
+ variant: "primary",
123
+ appearance: "dark",
124
+ disabled: !0,
125
+ class: [
126
+ "gi-bg-color-surface-tone-dark-fill-disabled",
127
+ "gi-text-color-text-tone-dark-fill-disabled",
128
+ "gi-stroke-color-text-tone-dark-fill-disabled"
129
+ ]
130
+ },
131
+ {
132
+ variant: "secondary",
133
+ appearance: "default",
134
+ disabled: !1,
135
+ class: [
136
+ "gi-border-color-border-tone-primary-outline-default",
137
+ "gi-text-color-text-tone-primary-outline-default",
138
+ "gi-stroke-color-text-tone-primary-outline-default",
139
+ "hover:gi-bg-color-surface-tone-primary-outline-hover",
140
+ "focus:gi-bg-color-surface-tone-primary-outline-hover"
141
+ ]
142
+ },
143
+ {
144
+ variant: "secondary",
145
+ appearance: "light",
146
+ disabled: !1,
147
+ class: [
148
+ "gi-text-color-text-tone-light-outline-default",
149
+ "gi-stroke-color-text-tone-light-outline-default",
150
+ "gi-border-color-border-tone-light-outline-default",
151
+ "gi-bg-base-transparent",
152
+ "hover:gi-bg-color-surface-tone-light-outline-hover",
153
+ "focus:gi-bg-color-surface-tone-dark-fill-hover"
154
+ ]
155
+ },
156
+ {
157
+ variant: "secondary",
158
+ appearance: "dark",
159
+ disabled: !1,
160
+ class: [
161
+ "gi-border-color-border-tone-dark-outline-default",
162
+ "gi-bg-color-surface-tone-dark-outline-default",
163
+ "hover:gi-bg-color-surface-tone-dark-outline-hover",
164
+ "focus:gi-bg-color-surface-tone-light-fill-hover"
165
+ ]
166
+ },
167
+ {
168
+ variant: "secondary",
169
+ appearance: "default",
170
+ disabled: !0,
171
+ class: [
172
+ "gi-border-color-border-tone-primary-outline-disabled",
173
+ "gi-bg-color-surface-tone-primary-outline-disabled",
174
+ "gi-text-color-text-tone-primary-outline-disabled",
175
+ "gi-stroke-color-text-tone-primary-outline-disabled"
176
+ ]
177
+ },
178
+ {
179
+ variant: "secondary",
180
+ appearance: "light",
181
+ disabled: !0,
182
+ class: [
183
+ "gi-bg-color-surface-tone-light-outline-disabled",
184
+ "gi-border-color-border-tone-light-outline-disabled",
185
+ "gi-text-color-text-tone-light-outline-disabled",
186
+ "gi-stroke-color-text-tone-light-outline-disabled"
187
+ ]
188
+ },
189
+ {
190
+ variant: "secondary",
191
+ appearance: "dark",
192
+ disabled: !0,
193
+ class: [
194
+ "gi-border-color-border-tone-dark-outline-disabled",
195
+ "gi-bg-color-surface-tone-dark-fill-disabled",
196
+ "gi-text-color-text-tone-dark-outline-disabled",
197
+ "gi-stroke-color-text-tone-dark-outline-disabled"
198
+ ]
199
+ },
200
+ {
201
+ variant: "flat",
202
+ appearance: "default",
203
+ disabled: !1,
204
+ class: [
205
+ "gi-text-color-text-tone-primary-flat-default",
206
+ "gi-stroke-color-text-tone-primary-flat-default",
207
+ "gi-bg-base-transparent",
208
+ "hover:gi-bg-color-surface-tone-primary-flat-hover",
209
+ "focus:gi-bg-color-surface-tone-primary-outline-hover"
210
+ ]
211
+ },
212
+ {
213
+ variant: "flat",
214
+ appearance: "light",
215
+ disabled: !1,
216
+ class: [
217
+ "gi-bg-color-surface-tone-light-flat-default",
218
+ "gi-text-color-text-tone-light-flat-default",
219
+ "gi-stroke-color-text-tone-light-flat-default",
220
+ "hover:gi-bg-color-surface-tone-light-flat-hover",
221
+ "focus:gi-bg-color-surface-tone-dark-fill-hover"
222
+ ]
223
+ },
224
+ {
225
+ variant: "flat",
226
+ appearance: "dark",
227
+ disabled: !1,
228
+ class: [
229
+ "gi-text-color-text-tone-dark-flat-default",
230
+ "gi-stroke-color-text-tone-dark-flat-default",
231
+ "hover:gi-bg-color-surface-tone-dark-flat-hover",
232
+ "focus:gi-bg-color-surface-tone-light-fill-hover"
233
+ ]
234
+ },
235
+ {
236
+ variant: "flat",
237
+ appearance: "default",
238
+ disabled: !0,
239
+ class: [
240
+ "gi-text-color-text-tone-primary-flat-disabled",
241
+ "gi-stroke-color-text-tone-primary-flat-disabled",
242
+ "gi-bg-color-surface-tone-primary-flat-disabled"
243
+ ]
244
+ },
245
+ {
246
+ variant: "flat",
247
+ appearance: "light",
248
+ disabled: !0,
249
+ class: [
250
+ "gi-bg-color-surface-tone-light-flat-disabled",
251
+ "gi-text-color-text-tone-light-flat-disabled",
252
+ "gi-stroke-color-text-tone-light-flat-disabled"
253
+ ]
254
+ },
255
+ {
256
+ variant: "flat",
257
+ appearance: "dark",
258
+ disabled: !0,
259
+ class: [
260
+ "gi-bg-color-surface-tone-dark-flat-disabled",
261
+ "gi-text-color-text-tone-dark-flat-disabled",
262
+ "gi-stroke-color-text-tone-dark-flat-disabled"
263
+ ]
264
+ }
265
+ ],
266
+ defaultVariants: {
267
+ variant: "primary",
268
+ appearance: "default",
269
+ size: "medium",
270
+ disabled: !1
271
+ }
272
+ }), f = (t = r.PRIMARY) => Object.values(r).includes(t) ? t : r.PRIMARY, u = (t) => t === i.LIGHT || t === i.DARK ? t : i.DEFAULT, b = (t) => t === o.SMALL || t === o.LARGE ? t : o.MEDIUM, y = s(function(e, d) {
273
+ return /* @__PURE__ */ n(
274
+ "button",
275
+ {
276
+ ref: d,
277
+ id: e.id,
278
+ className: g({
279
+ variant: f(e.variant),
280
+ appearance: u(e.appearance),
281
+ size: b(e.size),
282
+ disabled: !!e.disabled,
283
+ class: e.className
284
+ }),
285
+ disabled: e.disabled || void 0,
286
+ onClick: (l) => {
287
+ var a;
288
+ return (a = e.onClick) == null ? void 0 : a.call(e, l);
289
+ },
290
+ onFocus: (l) => {
291
+ var a;
292
+ return (a = e.onFocus) == null ? void 0 : a.call(e, l);
293
+ },
294
+ onBlur: (l) => {
295
+ var a;
296
+ return (a = e.onBlur) == null ? void 0 : a.call(e, l);
297
+ },
298
+ onKeyDown: (l) => {
299
+ var a;
300
+ return (a = e.onKeyDown) == null ? void 0 : a.call(e, l);
301
+ },
302
+ onKeyUp: (l) => {
303
+ var a;
304
+ return (a = e.onKeyUp) == null ? void 0 : a.call(e, l);
305
+ },
306
+ "aria-label": e.ariaLabel,
307
+ "aria-labelledby": e.ariaLabelledBy,
308
+ "aria-describedby": e.ariaDescribedBy,
309
+ "aria-pressed": e.ariaPressed,
310
+ "aria-expanded": e.ariaExpanded,
311
+ "aria-controls": e.ariaControls,
312
+ "aria-haspopup": e.ariaHasPopup,
313
+ "aria-busy": e.ariaBusy,
314
+ role: e.role,
315
+ type: e.type ?? "button",
316
+ form: e.form,
317
+ value: e.value,
318
+ tabIndex: e.tabIndex,
319
+ "data-testid": e.dataTestId ?? e.dataTestid,
320
+ children: e.children
321
+ }
322
+ );
323
+ });
324
+ export {
325
+ i as Appearance,
326
+ o as Size,
327
+ r as Variant,
328
+ y as default,
329
+ g as styles
330
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Mitosis automatically generates this file.
3
+ * Do not edit this file directly.
4
+ * The file source is in `packages/core/atoms/InsetText.lite.tsx`
5
+ */
6
+ export type Props = {
7
+ id?: string;
8
+ children: any;
9
+ cite?: string;
10
+ describedBy?: string;
11
+ labelledBy?: string;
12
+ };
13
+ declare function InsetText(props: Props): import("react/jsx-runtime").JSX.Element;
14
+ export default InsetText;