@aivenio/aquarium 1.66.0 → 1.67.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 +11 -3
- package/dist/_variables.scss +26 -14
- package/dist/atoms.cjs +73 -65
- package/dist/atoms.mjs +73 -65
- package/dist/src/atoms/Alert/Alert.js +10 -10
- package/dist/src/atoms/Card/Card.js +3 -3
- package/dist/src/atoms/Checkbox/Checkbox.js +3 -3
- package/dist/src/atoms/DataList/DataList.js +2 -2
- package/dist/src/atoms/DropdownMenu/DropdownMenu.js +3 -5
- package/dist/src/atoms/Navigation/Navigation.js +1 -1
- package/dist/src/atoms/RadioButton/RadioButton.js +4 -4
- package/dist/src/atoms/Select/Select.js +9 -12
- package/dist/src/atoms/Stepper/Stepper.js +5 -4
- package/dist/src/atoms/Switch/Switch.js +1 -1
- package/dist/src/atoms/Table/Table.js +1 -1
- package/dist/src/atoms/Toast/Toast.js +2 -2
- package/dist/src/molecules/Badge/Badge.d.ts +10 -4
- package/dist/src/molecules/Badge/Badge.js +5 -4
- package/dist/src/molecules/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/src/molecules/Button/Button.js +4 -4
- package/dist/src/molecules/Chip/Chip.js +8 -8
- package/dist/src/molecules/ControlLabel/ControlLabel.js +1 -1
- package/dist/src/molecules/Drawer/Drawer.js +7 -9
- package/dist/src/molecules/Dropdown/Dropdown.js +1 -1
- package/dist/src/molecules/DropdownMenu/DropdownMenu.js +10 -2
- package/dist/src/molecules/Input/Input.d.ts +4 -3
- package/dist/src/molecules/Input/Input.js +10 -4
- package/dist/src/molecules/MultiInput/InputChip.js +6 -7
- package/dist/src/molecules/NativeSelect/NativeSelect.js +3 -3
- package/dist/src/molecules/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/src/molecules/TagLabel/TagLabel.js +2 -2
- package/dist/src/molecules/Tooltip/Tooltip.js +3 -3
- package/dist/src/utils/constants.js +3 -3
- package/dist/src/utils/form/InputAdornment/InputAdornment.js +3 -3
- package/dist/src/utils/form/Label/Label.js +2 -2
- package/dist/styles.css +116 -95
- package/dist/system.cjs +122 -102
- package/dist/system.mjs +128 -108
- package/dist/tailwind.config.js +25 -13
- package/dist/tailwind.theme.json +26 -14
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
@@ -60,7 +60,7 @@ This project requires certain environment variables to be set before commands su
|
|
60
60
|
|
61
61
|
- Create an npm account [here](https://www.npmjs.com/signup) if you don't already have one.
|
62
62
|
- Generate a token for your account. You can read about how to do so [here](https://docs.npmjs.com/creating-and-viewing-access-tokens). For the purposes of building the project, read-only access will suffice.
|
63
|
-
- Copy the sample environment file: `cp .env.sample env`
|
63
|
+
- Copy the sample environment file: `cp .env.sample .env`
|
64
64
|
- Add the necessary data into the newly-created `.env` file.
|
65
65
|
- Source the `.env` file for the environment variables to be set: `source .env`
|
66
66
|
|
@@ -81,9 +81,12 @@ After Figma has been edited, run:
|
|
81
81
|
- Install Tailwind CSS IntelliSense extension. See <https://github.com/tailwindlabs/tailwindcss-intellisense#recommended-vs-code-settings>
|
82
82
|
- Install ESLint extension and optionally enable auto-format on save. See _"Step 4 — Formatting on Save"_ from <https://www.digitalocean.com/community/tutorials/linting-and-formatting-with-eslint-in-vs-code>
|
83
83
|
|
84
|
-
###
|
84
|
+
### Running locally
|
85
85
|
|
86
|
-
To develop Aquarium components in the context of an application, it is easier to
|
86
|
+
To develop Aquarium components in the context of an application, it is easier to run a locally modified version of Aquarium in your application (e.g. Console).
|
87
|
+
There are two ways to do this: [npm link](https://docs.npmjs.com/cli/v7/commands/npm-link), or copying the module into your app. This allows you to make changes to components and instantly see the change in the context of the app.
|
88
|
+
|
89
|
+
#### npm link
|
87
90
|
|
88
91
|
1. In design-system directory, run `npm link`
|
89
92
|
2. In design-system directory, run `npm link <path to app>/node_modules/react` to avoid running into conflict of having two react instances. This will otherwise break the rules of hooks and crash the app. More info on the issue [here](https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react). If the command fails with errors about peer dependencies, re-run the command, adding `--force` at the end.
|
@@ -93,6 +96,11 @@ To develop Aquarium components in the context of an application, it is easier to
|
|
93
96
|
6. Done! Now you should be able to develop DS locally, and changes are reflected to the application which depends on `@aivenio/aquarium`
|
94
97
|
7. When you want to stop using the npm link, and go back to the regular imported version, in your app directory, run `npm unlink --no-save @aivenio/aquarium`, then `npm i` to reinstall the dependency.
|
95
98
|
|
99
|
+
#### Copy module
|
100
|
+
|
101
|
+
npm link can be tricky to get working. A simpler approach is to build the module and copy it into your application's `node-modules` directory:
|
102
|
+
`npm run build:ds:module && cp -r dist <path to app>/node_modules/@aivenio/aquarium`
|
103
|
+
|
96
104
|
### Running tests
|
97
105
|
|
98
106
|
Remember that `source .env` is needed before NPM commands.
|
package/dist/_variables.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
// Do not edit directly
|
3
|
-
// Generated on Wed,
|
3
|
+
// Generated on Wed, 22 May 2024 13:00:37 GMT
|
4
4
|
|
5
5
|
$border-radius-none: 0px !default;
|
6
6
|
$border-radius-sm: 0.125rem !default;
|
@@ -112,41 +112,48 @@ $screens-md: 1056px !default;
|
|
112
112
|
$screens-lg: 1312px !default;
|
113
113
|
$screens-xl: 1536px !default;
|
114
114
|
$background-color-body: var(--aquarium-colors-white) !default;
|
115
|
+
$background-color-body-intense: var(--aquarium-colors-grey-80) !default;
|
115
116
|
$background-color-popover-content: var(--aquarium-colors-white) !default;
|
116
117
|
$background-color-muted: var(--aquarium-colors-grey-0) !default;
|
117
118
|
$background-color-default: var(--aquarium-colors-grey-5) !default;
|
118
119
|
$background-color-intense: var(--aquarium-colors-grey-20) !default;
|
119
|
-
$background-color-intense-2x: var(--aquarium-colors-grey-80) !default;
|
120
|
-
$background-color-primary-muted-3x: var(--aquarium-colors-primary-5) !default;
|
121
|
-
$background-color-primary-muted-2x: var(--aquarium-colors-primary-10) !default;
|
122
120
|
$background-color-primary-muted: var(--aquarium-colors-primary-40) !default;
|
123
121
|
$background-color-primary-default: var(--aquarium-colors-primary-80) !default;
|
124
122
|
$background-color-primary-intense: var(--aquarium-colors-primary-90) !default;
|
125
|
-
$background-color-
|
123
|
+
$background-color-primary-active: var(--aquarium-colors-primary-5) !default;
|
124
|
+
$background-color-primary-hover: var(--aquarium-colors-primary-5) !default;
|
126
125
|
$background-color-info-muted: var(--aquarium-colors-info-10) !default;
|
127
126
|
$background-color-info-default: var(--aquarium-colors-info-70) !default;
|
127
|
+
$background-color-info-intense: var(--aquarium-colors-info-90) !default;
|
128
128
|
$background-color-success-muted: var(--aquarium-colors-success-5) !default;
|
129
129
|
$background-color-success-default: var(--aquarium-colors-success-70) !default;
|
130
130
|
$background-color-success-intense: var(--aquarium-colors-success-90) !default;
|
131
131
|
$background-color-warning-muted: var(--aquarium-colors-warning-5) !default;
|
132
132
|
$background-color-warning-default: var(--aquarium-colors-warning-70) !default;
|
133
|
-
$background-color-
|
133
|
+
$background-color-warning-intense: var(--aquarium-colors-warning-90) !default;
|
134
134
|
$background-color-danger-muted: var(--aquarium-colors-error-10) !default;
|
135
135
|
$background-color-danger-default: var(--aquarium-colors-error-20) !default;
|
136
136
|
$background-color-danger-intense: var(--aquarium-colors-error-50) !default;
|
137
|
-
$
|
137
|
+
$background-color-status-announcement: var(--aquarium-colors-primary-5) !default;
|
138
|
+
$background-color-status-info: var(--aquarium-colors-info-10) !default;
|
139
|
+
$background-color-status-warning: var(--aquarium-colors-warning-5) !default;
|
140
|
+
$background-color-status-danger: var(--aquarium-colors-error-5) !default;
|
141
|
+
$background-color-status-success: var(--aquarium-colors-success-5) !default;
|
138
142
|
$border-color-muted: var(--aquarium-colors-grey-5) !default;
|
139
143
|
$border-color-default: var(--aquarium-colors-grey-20) !default;
|
140
144
|
$border-color-intense: var(--aquarium-colors-grey-50) !default;
|
141
|
-
$border-color-primary-muted-3x: var(--aquarium-colors-primary-10) !default;
|
142
|
-
$border-color-primary-muted-2x: var(--aquarium-colors-primary-40) !default;
|
143
145
|
$border-color-primary-muted: var(--aquarium-colors-primary-60) !default;
|
144
146
|
$border-color-primary-default: var(--aquarium-colors-primary-80) !default;
|
147
|
+
$border-color-primary-intense: var(--aquarium-colors-primary-100) !default;
|
148
|
+
$border-color-info-muted: var(--aquarium-colors-info-50) !default;
|
145
149
|
$border-color-info-default: var(--aquarium-colors-info-70) !default;
|
150
|
+
$border-color-info-intense: var(--aquarium-colors-info-90) !default;
|
146
151
|
$border-color-success-muted: var(--aquarium-colors-success-10) !default;
|
147
152
|
$border-color-success-default: var(--aquarium-colors-success-40) !default;
|
148
153
|
$border-color-success-intense: var(--aquarium-colors-success-70) !default;
|
149
154
|
$border-color-warning-muted: var(--aquarium-colors-warning-20) !default;
|
155
|
+
$border-color-warning-default: var(--aquarium-colors-warning-70) !default;
|
156
|
+
$border-color-warning-intense: var(--aquarium-colors-warning-90) !default;
|
150
157
|
$border-color-danger-muted: var(--aquarium-colors-error-10) !default;
|
151
158
|
$border-color-danger-default: var(--aquarium-colors-error-50) !default;
|
152
159
|
$border-color-danger-intense: var(--aquarium-colors-error-80) !default;
|
@@ -211,23 +218,28 @@ $spacing-l4: 48px !default;
|
|
211
218
|
$spacing-l5: 64px !default;
|
212
219
|
$spacing-l6: 96px !default;
|
213
220
|
$spacing-l7: 160px !default;
|
214
|
-
$text-color-
|
215
|
-
$text-color-muted-2x: var(--aquarium-colors-grey-40) !default;
|
221
|
+
$text-color-inactive: var(--aquarium-colors-grey-40) !default;
|
216
222
|
$text-color-muted: var(--aquarium-colors-grey-50) !default;
|
217
223
|
$text-color-default: var(--aquarium-colors-grey-70) !default;
|
218
224
|
$text-color-intense: var(--aquarium-colors-grey-90) !default;
|
219
|
-
$text-color-primary-
|
220
|
-
$text-color-primary-
|
225
|
+
$text-color-primary-inactive: var(--aquarium-colors-primary-40) !default;
|
226
|
+
$text-color-primary-active: var(--aquarium-colors-primary-90) !default;
|
221
227
|
$text-color-primary-muted: var(--aquarium-colors-primary-60) !default;
|
222
228
|
$text-color-primary-default: var(--aquarium-colors-primary-70) !default;
|
223
229
|
$text-color-primary-intense: var(--aquarium-colors-primary-80) !default;
|
224
|
-
$text-color-
|
230
|
+
$text-color-info-inactive: var(--aquarium-colors-info-20) !default;
|
231
|
+
$text-color-info-muted: var(--aquarium-colors-info-40) !default;
|
225
232
|
$text-color-info-default: var(--aquarium-colors-info-70) !default;
|
226
233
|
$text-color-info-intense: var(--aquarium-colors-info-90) !default;
|
234
|
+
$text-color-success-inactive: var(--aquarium-colors-success-10) !default;
|
235
|
+
$text-color-success-muted: var(--aquarium-colors-success-30) !default;
|
227
236
|
$text-color-success-default: var(--aquarium-colors-success-70) !default;
|
228
237
|
$text-color-success-intense: var(--aquarium-colors-success-90) !default;
|
238
|
+
$text-color-warning-inactive: var(--aquarium-colors-warning-20) !default;
|
239
|
+
$text-color-warning-muted: var(--aquarium-colors-warning-40) !default;
|
229
240
|
$text-color-warning-default: var(--aquarium-colors-warning-80) !default;
|
230
241
|
$text-color-warning-intense: var(--aquarium-colors-warning-100) !default;
|
242
|
+
$text-color-danger-inactive: var(--aquarium-colors-error-10) !default;
|
231
243
|
$text-color-danger-muted: var(--aquarium-colors-error-20) !default;
|
232
244
|
$text-color-danger-default: var(--aquarium-colors-error-50) !default;
|
233
245
|
$text-color-danger-intense: var(--aquarium-colors-error-80) !default;
|
package/dist/atoms.cjs
CHANGED
@@ -5129,28 +5129,33 @@ var tailwind_theme_default = {
|
|
5129
5129
|
white: "var(--aquarium-colors-white, white)",
|
5130
5130
|
black: "var(--aquarium-colors-black, black)",
|
5131
5131
|
body: "var(--aquarium-background-color-body)",
|
5132
|
+
"body-intense": "var(--aquarium-background-color-body-intense)",
|
5132
5133
|
"popover-content": "var(--aquarium-background-color-popover-content)",
|
5133
5134
|
muted: "var(--aquarium-background-color-muted)",
|
5134
5135
|
default: "var(--aquarium-background-color-default)",
|
5135
5136
|
intense: "var(--aquarium-background-color-intense)",
|
5136
|
-
"intense-2x": "var(--aquarium-background-color-intense-2x)",
|
5137
|
-
"primary-muted-3x": "var(--aquarium-background-color-primary-muted-3x)",
|
5138
|
-
"primary-muted-2x": "var(--aquarium-background-color-primary-muted-2x)",
|
5139
5137
|
"primary-muted": "var(--aquarium-background-color-primary-muted)",
|
5140
5138
|
"primary-default": "var(--aquarium-background-color-primary-default)",
|
5141
5139
|
"primary-intense": "var(--aquarium-background-color-primary-intense)",
|
5142
|
-
"
|
5140
|
+
"primary-active": "var(--aquarium-background-color-primary-active)",
|
5141
|
+
"primary-hover": "var(--aquarium-background-color-primary-hover)",
|
5143
5142
|
"info-muted": "var(--aquarium-background-color-info-muted)",
|
5144
5143
|
"info-default": "var(--aquarium-background-color-info-default)",
|
5144
|
+
"info-intense": "var(--aquarium-background-color-info-intense)",
|
5145
5145
|
"success-muted": "var(--aquarium-background-color-success-muted)",
|
5146
5146
|
"success-default": "var(--aquarium-background-color-success-default)",
|
5147
5147
|
"success-intense": "var(--aquarium-background-color-success-intense)",
|
5148
5148
|
"warning-muted": "var(--aquarium-background-color-warning-muted)",
|
5149
5149
|
"warning-default": "var(--aquarium-background-color-warning-default)",
|
5150
|
-
"
|
5150
|
+
"warning-intense": "var(--aquarium-background-color-warning-intense)",
|
5151
5151
|
"danger-muted": "var(--aquarium-background-color-danger-muted)",
|
5152
5152
|
"danger-default": "var(--aquarium-background-color-danger-default)",
|
5153
|
-
"danger-intense": "var(--aquarium-background-color-danger-intense)"
|
5153
|
+
"danger-intense": "var(--aquarium-background-color-danger-intense)",
|
5154
|
+
"status-announcement": "var(--aquarium-background-color-status-announcement)",
|
5155
|
+
"status-info": "var(--aquarium-background-color-status-info)",
|
5156
|
+
"status-warning": "var(--aquarium-background-color-status-warning)",
|
5157
|
+
"status-danger": "var(--aquarium-background-color-status-danger)",
|
5158
|
+
"status-success": "var(--aquarium-background-color-status-success)"
|
5154
5159
|
},
|
5155
5160
|
textColor: {
|
5156
5161
|
"error-100": "var(--aquarium-colors-error-100, #aa0000)",
|
@@ -5241,23 +5246,28 @@ var tailwind_theme_default = {
|
|
5241
5246
|
current: "var(--aquarium-colors-current, currentColor)",
|
5242
5247
|
white: "var(--aquarium-colors-white, white)",
|
5243
5248
|
black: "var(--aquarium-colors-black, black)",
|
5244
|
-
|
5245
|
-
"muted-2x": "var(--aquarium-text-color-muted-2x)",
|
5249
|
+
inactive: "var(--aquarium-text-color-inactive)",
|
5246
5250
|
muted: "var(--aquarium-text-color-muted)",
|
5247
5251
|
default: "var(--aquarium-text-color-default)",
|
5248
5252
|
intense: "var(--aquarium-text-color-intense)",
|
5249
|
-
"primary-
|
5250
|
-
"primary-
|
5253
|
+
"primary-inactive": "var(--aquarium-text-color-primary-inactive)",
|
5254
|
+
"primary-active": "var(--aquarium-text-color-primary-active)",
|
5251
5255
|
"primary-muted": "var(--aquarium-text-color-primary-muted)",
|
5252
5256
|
"primary-default": "var(--aquarium-text-color-primary-default)",
|
5253
5257
|
"primary-intense": "var(--aquarium-text-color-primary-intense)",
|
5254
|
-
"
|
5258
|
+
"info-inactive": "var(--aquarium-text-color-info-inactive)",
|
5259
|
+
"info-muted": "var(--aquarium-text-color-info-muted)",
|
5255
5260
|
"info-default": "var(--aquarium-text-color-info-default)",
|
5256
5261
|
"info-intense": "var(--aquarium-text-color-info-intense)",
|
5262
|
+
"success-inactive": "var(--aquarium-text-color-success-inactive)",
|
5263
|
+
"success-muted": "var(--aquarium-text-color-success-muted)",
|
5257
5264
|
"success-default": "var(--aquarium-text-color-success-default)",
|
5258
5265
|
"success-intense": "var(--aquarium-text-color-success-intense)",
|
5266
|
+
"warning-inactive": "var(--aquarium-text-color-warning-inactive)",
|
5267
|
+
"warning-muted": "var(--aquarium-text-color-warning-muted)",
|
5259
5268
|
"warning-default": "var(--aquarium-text-color-warning-default)",
|
5260
5269
|
"warning-intense": "var(--aquarium-text-color-warning-intense)",
|
5270
|
+
"danger-inactive": "var(--aquarium-text-color-danger-inactive)",
|
5261
5271
|
"danger-muted": "var(--aquarium-text-color-danger-muted)",
|
5262
5272
|
"danger-default": "var(--aquarium-text-color-danger-default)",
|
5263
5273
|
"danger-intense": "var(--aquarium-text-color-danger-intense)"
|
@@ -5352,19 +5362,21 @@ var tailwind_theme_default = {
|
|
5352
5362
|
white: "var(--aquarium-colors-white, white)",
|
5353
5363
|
black: "var(--aquarium-colors-black, black)",
|
5354
5364
|
DEFAULT: "currentColor",
|
5355
|
-
"muted-2x": "var(--aquarium-border-color-muted-2x)",
|
5356
5365
|
muted: "var(--aquarium-border-color-muted)",
|
5357
5366
|
default: "var(--aquarium-border-color-default)",
|
5358
5367
|
intense: "var(--aquarium-border-color-intense)",
|
5359
|
-
"primary-muted-3x": "var(--aquarium-border-color-primary-muted-3x)",
|
5360
|
-
"primary-muted-2x": "var(--aquarium-border-color-primary-muted-2x)",
|
5361
5368
|
"primary-muted": "var(--aquarium-border-color-primary-muted)",
|
5362
5369
|
"primary-default": "var(--aquarium-border-color-primary-default)",
|
5370
|
+
"primary-intense": "var(--aquarium-border-color-primary-intense)",
|
5371
|
+
"info-muted": "var(--aquarium-border-color-info-muted)",
|
5363
5372
|
"info-default": "var(--aquarium-border-color-info-default)",
|
5373
|
+
"info-intense": "var(--aquarium-border-color-info-intense)",
|
5364
5374
|
"success-muted": "var(--aquarium-border-color-success-muted)",
|
5365
5375
|
"success-default": "var(--aquarium-border-color-success-default)",
|
5366
5376
|
"success-intense": "var(--aquarium-border-color-success-intense)",
|
5367
5377
|
"warning-muted": "var(--aquarium-border-color-warning-muted)",
|
5378
|
+
"warning-default": "var(--aquarium-border-color-warning-default)",
|
5379
|
+
"warning-intense": "var(--aquarium-border-color-warning-intense)",
|
5368
5380
|
"danger-muted": "var(--aquarium-border-color-danger-muted)",
|
5369
5381
|
"danger-default": "var(--aquarium-border-color-danger-default)",
|
5370
5382
|
"danger-intense": "var(--aquarium-border-color-danger-intense)"
|
@@ -5807,7 +5819,7 @@ var Toast = (_a) => {
|
|
5807
5819
|
return /* @__PURE__ */ import_react7.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
5808
5820
|
className: (0, import_classnames2.default)(
|
5809
5821
|
tw("typography-body-small rounded grid grid-cols-[1fr_auto] items-center gap-x-6 gap-y-2 p-4 text-white", {
|
5810
|
-
"bg-intense
|
5822
|
+
"bg-body-intense": variant === "default",
|
5811
5823
|
"bg-danger-intense": variant === "danger"
|
5812
5824
|
}),
|
5813
5825
|
className
|
@@ -6511,7 +6523,7 @@ var TooltipWrapper = import_react17.default.forwardRef(
|
|
6511
6523
|
const arrowStyle = getArrowStyle(ref.current, placement, (_a2 = arrowProps.style) != null ? _a2 : {});
|
6512
6524
|
return /* @__PURE__ */ import_react17.default.createElement(import_overlays3.OverlayContainer, null, /* @__PURE__ */ import_react17.default.createElement("div", __spreadValues({
|
6513
6525
|
ref,
|
6514
|
-
className: classNames(tw("p-3 rounded-sm typography-caption max-w-[320px] bg-intense
|
6526
|
+
className: classNames(tw("p-3 rounded-sm typography-caption max-w-[320px] bg-body-intense text-white"))
|
6515
6527
|
}, (0, import_utils.mergeProps)(props, tooltipProps)), props.children, /* @__PURE__ */ import_react17.default.createElement(Arrow, __spreadProps(__spreadValues({}, arrowProps), {
|
6516
6528
|
style: arrowStyle
|
6517
6529
|
}))));
|
@@ -6550,13 +6562,13 @@ var getArrowStyle = (element, position, { left, top }) => {
|
|
6550
6562
|
};
|
6551
6563
|
var Arrow = (props) => {
|
6552
6564
|
return /* @__PURE__ */ import_react17.default.createElement("div", __spreadValues({
|
6553
|
-
className: tw("absolute w-3 h-3 bg-intense
|
6565
|
+
className: tw("absolute w-3 h-3 bg-body-intense rotate-45")
|
6554
6566
|
}, props));
|
6555
6567
|
};
|
6556
6568
|
|
6557
6569
|
// src/utils/constants.ts
|
6558
6570
|
var ghostButtonStyle = tw(
|
6559
|
-
"text-primary-intense active:text-primary-
|
6571
|
+
"text-primary-intense active:text-primary-active focus-visible:text-primary-active hover:text-primary-active disabled:text-primary-inactive"
|
6560
6572
|
);
|
6561
6573
|
var linkStyle = classNames(
|
6562
6574
|
ghostButtonStyle,
|
@@ -6575,15 +6587,15 @@ var COLOR_CLASSNAMES = {
|
|
6575
6587
|
),
|
6576
6588
|
"secondary": tw(
|
6577
6589
|
"text-primary-intense bg-body ring-1 ring-primary-80 ring-inset",
|
6578
|
-
"active:bg-primary-
|
6590
|
+
"active:bg-primary-active active:ring-primary-90 active:text-primary-intense",
|
6579
6591
|
"focus-visible:ring-2 focus-visible:ring-primary-90 focus-visible:text-primary-intense",
|
6580
|
-
"hover:bg-primary-
|
6581
|
-
"disabled:bg-body disabled:text-primary-
|
6592
|
+
"hover:bg-primary-hover hover:ring-primary-90 hover:text-primary-intense",
|
6593
|
+
"disabled:bg-body disabled:text-primary-inactive disabled:ring-primary-40"
|
6582
6594
|
),
|
6583
6595
|
"ghost": ghostButtonStyle,
|
6584
6596
|
"text": linkStyle,
|
6585
6597
|
"secondary-ghost": tw(
|
6586
|
-
"text-grey-60 active:text-muted focus-visible:text-intense hover:text-intense disabled:text-
|
6598
|
+
"text-grey-60 active:text-muted focus-visible:text-intense hover:text-intense disabled:text-inactive"
|
6587
6599
|
)
|
6588
6600
|
};
|
6589
6601
|
var LoadingSpinner = ({ size = "20px" }) => {
|
@@ -6686,7 +6698,7 @@ var asButton = (Component, isDropdownButton) => {
|
|
6686
6698
|
tw(
|
6687
6699
|
"inline-block border-0 rounded-sm transition whitespace-nowrap focus:outline-none relative text-center",
|
6688
6700
|
{
|
6689
|
-
"text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-muted focus-visible:text-intense focus-visible:bg-muted disabled:text-
|
6701
|
+
"text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-muted focus-visible:text-intense focus-visible:bg-muted disabled:text-inactive disabled:bg-transparent": isIconOnlyButton,
|
6690
6702
|
"typography-default-strong": !dense && !isIconOnlyButton && kind !== "text",
|
6691
6703
|
"typography-small-strong": dense && !isIconOnlyButton && kind !== "text",
|
6692
6704
|
"py-3 px-4": !dense && isButton,
|
@@ -6877,11 +6889,11 @@ var Alert = (_a) => {
|
|
6877
6889
|
role: type === "error" || type === "warning" ? "alert" : "status",
|
6878
6890
|
className: classNames(
|
6879
6891
|
tw("rounded grid grid-cols-[auto_1fr_auto] items-center gap-x-3 gap-y-2", {
|
6880
|
-
"bg-danger
|
6881
|
-
"bg-info
|
6882
|
-
"bg-success
|
6883
|
-
"bg-warning
|
6884
|
-
"bg-
|
6892
|
+
"bg-status-danger": type === "error",
|
6893
|
+
"bg-status-info": type === "information",
|
6894
|
+
"bg-status-success": type === "success",
|
6895
|
+
"bg-status-warning": type === "warning",
|
6896
|
+
"bg-status-announcement": type === "announcement",
|
6885
6897
|
"p-4": Boolean(dense),
|
6886
6898
|
"p-5": !dense
|
6887
6899
|
}),
|
@@ -6945,10 +6957,10 @@ var Banner = (_a) => {
|
|
6945
6957
|
role: type === "error" || type === "warning" ? "alert" : "status",
|
6946
6958
|
className: classNames(
|
6947
6959
|
tw("relative flex px-[60px] justify-center", {
|
6948
|
-
"bg-danger
|
6949
|
-
"bg-
|
6950
|
-
"bg-success
|
6951
|
-
"bg-warning
|
6960
|
+
"bg-status-danger": type === "error",
|
6961
|
+
"bg-status-announcement": type === "information",
|
6962
|
+
"bg-status-success": type === "success",
|
6963
|
+
"bg-status-warning": type === "warning"
|
6952
6964
|
}),
|
6953
6965
|
className
|
6954
6966
|
)
|
@@ -7320,7 +7332,7 @@ var Card = import_react24.default.forwardRef((props, ref) => {
|
|
7320
7332
|
className: classNames(
|
7321
7333
|
getCommonCardStyles(props),
|
7322
7334
|
tw({
|
7323
|
-
"cursor-pointer hover:bg-primary-
|
7335
|
+
"cursor-pointer hover:bg-primary-hover active:bg-body": clickable && !disabled,
|
7324
7336
|
"focusable": clickable && modality === "keyboard"
|
7325
7337
|
}),
|
7326
7338
|
className
|
@@ -7333,7 +7345,7 @@ var Label = (props) => {
|
|
7333
7345
|
className: classNames(
|
7334
7346
|
getCommonCardStyles(props),
|
7335
7347
|
tw({
|
7336
|
-
"cursor-pointer hover:bg-primary-
|
7348
|
+
"cursor-pointer hover:bg-primary-hover active:bg-body": !disabled,
|
7337
7349
|
"border-primary-default": checked,
|
7338
7350
|
"focusable": modality === "keyboard"
|
7339
7351
|
}),
|
@@ -7447,17 +7459,17 @@ var Checkbox = import_react25.default.forwardRef(
|
|
7447
7459
|
disabled
|
7448
7460
|
})), /* @__PURE__ */ import_react25.default.createElement(Icon, {
|
7449
7461
|
icon: indeterminate ? import_minus2.default : import_tick2.default,
|
7450
|
-
strokeWidth: "
|
7462
|
+
strokeWidth: "3px",
|
7451
7463
|
className: classNames(
|
7452
7464
|
tw(
|
7453
7465
|
"absolute top-0 right-0",
|
7454
7466
|
"pointer-events-none p-[2px] w-5 h-5",
|
7455
|
-
"text-transparent [&>path]:stroke-transparent [&>path]:stroke-
|
7467
|
+
"text-transparent [&>path]:stroke-transparent [&>path]:stroke-[3px]",
|
7456
7468
|
"rounded-sm border border-default peer-focus:border-info-default"
|
7457
7469
|
),
|
7458
7470
|
{
|
7459
7471
|
"peer-hover:border-intense peer-checked:text-white peer-checked:[&>path]:stroke-white peer-checked:border-primary-default": !disabled,
|
7460
|
-
"border-muted peer-checked:text-primary-
|
7472
|
+
"border-muted peer-checked:text-primary-default peer-checked:[&>path]:stroke-primary-70 peer-checked:border-transparent": disabled
|
7461
7473
|
}
|
7462
7474
|
)
|
7463
7475
|
}));
|
@@ -7505,11 +7517,11 @@ var RadioButton = import_react27.default.forwardRef(
|
|
7505
7517
|
className: classNames(
|
7506
7518
|
tw(
|
7507
7519
|
"inline-flex justify-center items-center self-center appearance-none",
|
7508
|
-
"w-5 h-5 p-[3px] rounded-full
|
7520
|
+
"w-5 h-5 p-[3px] rounded-full border border-default",
|
7509
7521
|
"outline-none focus:border-info-default checked:bg-primary-default checked:shadow-whiteInset",
|
7510
7522
|
{
|
7511
|
-
"hover:border-intense checked:border-primary-default": !disabled,
|
7512
|
-
"cursor-not-allowed border-muted bg-muted checked:bg-
|
7523
|
+
"cursor-pointer hover:border-intense checked:border-primary-default": !disabled,
|
7524
|
+
"cursor-not-allowed border-muted bg-muted checked:bg-primary-muted checked:border-transparent": disabled
|
7513
7525
|
}
|
7514
7526
|
)
|
7515
7527
|
),
|
@@ -7602,7 +7614,7 @@ var TableSelectCell = (_a) => {
|
|
7602
7614
|
};
|
7603
7615
|
var getSortCellButtonClassNames = (align) => tw("group flex items-center gap-x-4 text-muted", { "flex-row-reverse": align === "right" });
|
7604
7616
|
var getSortCellIconClassNames = (active) => {
|
7605
|
-
return tw("text-[9px]", active ? "text-default" : "text-
|
7617
|
+
return tw("text-[9px]", active ? "text-default" : "text-inactive");
|
7606
7618
|
};
|
7607
7619
|
var TableSortCell = (_a) => {
|
7608
7620
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
@@ -7719,7 +7731,7 @@ var Row = (_a) => {
|
|
7719
7731
|
}), { inert: disabled ? "" : void 0 }), {
|
7720
7732
|
className: classNames(tw("contents"), className, {
|
7721
7733
|
"children:opacity-70": disabled,
|
7722
|
-
"[&>*]:bg-primary-
|
7734
|
+
"[&>*]:bg-primary-active": active,
|
7723
7735
|
"[&>*]:hover:bg-muted": !disabled && !header
|
7724
7736
|
})
|
7725
7737
|
}));
|
@@ -7890,7 +7902,7 @@ var Skeleton = (_a) => {
|
|
7890
7902
|
// src/molecules/Badge/Badge.tsx
|
7891
7903
|
var createBadge = (type, displayName) => {
|
7892
7904
|
const Component = (props) => {
|
7893
|
-
const _a = props, { kind = "filled", value, textClassname, dense = false } = _a, rest = __objRest(_a, ["kind", "value", "textClassname", "dense"]);
|
7905
|
+
const _a = props, { kind = "filled", value, textClassname, dense = false, disabled = false } = _a, rest = __objRest(_a, ["kind", "value", "textClassname", "dense", "disabled"]);
|
7894
7906
|
const valueStr = value.toString();
|
7895
7907
|
return /* @__PURE__ */ import_react31.default.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
7896
7908
|
className: classNames(
|
@@ -7899,7 +7911,8 @@ var createBadge = (type, displayName) => {
|
|
7899
7911
|
"rounded": type === "tab",
|
7900
7912
|
"border border-current": kind === "outlined",
|
7901
7913
|
"bg-current": kind === "filled" && type !== "chip",
|
7902
|
-
"bg-white": type === "chip",
|
7914
|
+
"bg-white": type === "chip" && !disabled,
|
7915
|
+
"bg-muted": type === "chip" && disabled,
|
7903
7916
|
"typography-caption-small leading-none py-1 px-2": !dense,
|
7904
7917
|
"text-[8px]": dense,
|
7905
7918
|
"px-1": dense && valueStr.length > 1,
|
@@ -7991,9 +8004,7 @@ var Group = import_react32.default.forwardRef(
|
|
7991
8004
|
return /* @__PURE__ */ import_react32.default.createElement("li", __spreadValues({
|
7992
8005
|
ref
|
7993
8006
|
}, props), title && /* @__PURE__ */ import_react32.default.createElement("div", __spreadValues({
|
7994
|
-
className: classNames(className, "p-3 text-
|
7995
|
-
"text-muted-3x": props.disabled
|
7996
|
-
})
|
8007
|
+
className: classNames(className, "p-3 text-inactive uppercase cursor-default typography-caption")
|
7997
8008
|
}, titleProps), title), children);
|
7998
8009
|
}
|
7999
8010
|
);
|
@@ -8007,7 +8018,7 @@ var Item2 = import_react32.default.forwardRef(
|
|
8007
8018
|
"cursor-pointer hover:bg-muted": !props.disabled,
|
8008
8019
|
"bg-muted": highlighted,
|
8009
8020
|
"text-primary-intense": kind === "action",
|
8010
|
-
"text-
|
8021
|
+
"text-inactive cursor-not-allowed": props.disabled
|
8011
8022
|
})
|
8012
8023
|
}, props), icon && showNotification && /* @__PURE__ */ import_react32.default.createElement(Badge.Notification, null, /* @__PURE__ */ import_react32.default.createElement(InlineIcon, {
|
8013
8024
|
icon
|
@@ -8347,7 +8358,7 @@ var Section = (_a) => {
|
|
8347
8358
|
role: "presentation",
|
8348
8359
|
className: tw("py-5")
|
8349
8360
|
}, title && /* @__PURE__ */ import_react37.default.createElement("div", {
|
8350
|
-
className: classNames(className, "py-2 px-6 text-
|
8361
|
+
className: classNames(className, "py-2 px-6 text-inactive uppercase cursor-default typography-caption")
|
8351
8362
|
}, title), /* @__PURE__ */ import_react37.default.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
8352
8363
|
role: "group",
|
8353
8364
|
className: classNames(tw("flex flex-col"), className)
|
@@ -8661,10 +8672,10 @@ var Input = import_react43.default.forwardRef((_a, ref) => {
|
|
8661
8672
|
type: "text",
|
8662
8673
|
className: classNames(
|
8663
8674
|
className,
|
8664
|
-
"grow rounded border-0 focus:outline-none px-[1px] my-1 min-w-0 typography-small disabled:cursor-not-allowed disabled:bg-default placeholder:text-
|
8675
|
+
"grow rounded border-0 focus:outline-none px-[1px] my-1 min-w-0 typography-small disabled:cursor-not-allowed disabled:bg-default placeholder:text-inactive",
|
8665
8676
|
{
|
8666
8677
|
"text-default": !props.disabled,
|
8667
|
-
"text-
|
8678
|
+
"text-inactive": props.disabled,
|
8668
8679
|
"cursor-default": props.readOnly
|
8669
8680
|
}
|
8670
8681
|
)
|
@@ -8686,7 +8697,7 @@ var NoResults = import_react43.default.forwardRef(
|
|
8686
8697
|
return /* @__PURE__ */ import_react43.default.createElement("li", __spreadProps(__spreadValues({
|
8687
8698
|
ref
|
8688
8699
|
}, rest), {
|
8689
|
-
className: classNames(tw("p-3 text-
|
8700
|
+
className: classNames(tw("p-3 text-inactive italic typography-small"), className)
|
8690
8701
|
}), children);
|
8691
8702
|
}
|
8692
8703
|
);
|
@@ -8706,10 +8717,7 @@ var Group2 = import_react43.default.forwardRef((_a, ref) => {
|
|
8706
8717
|
ref,
|
8707
8718
|
className: classNames(
|
8708
8719
|
className,
|
8709
|
-
"flex items-center gap-x-3 p-3 text-
|
8710
|
-
{
|
8711
|
-
"text-muted-3x": props.disabled
|
8712
|
-
}
|
8720
|
+
"flex items-center gap-x-3 p-3 text-inactive uppercase cursor-default typography-caption mt-4 first:mt-0"
|
8713
8721
|
)
|
8714
8722
|
}, props), children);
|
8715
8723
|
});
|
@@ -8737,12 +8745,11 @@ var ActionItem = import_react43.default.forwardRef(
|
|
8737
8745
|
ref,
|
8738
8746
|
role: "button",
|
8739
8747
|
onClick: () => !props.disabled && (onClick == null ? void 0 : onClick()),
|
8740
|
-
className: classNames(className, "flex items-center gap-x-3 typography-small
|
8748
|
+
className: classNames(className, "flex items-center gap-x-3 typography-small", {
|
8741
8749
|
"p-3": !dense,
|
8742
8750
|
"px-3 py-2": dense,
|
8743
|
-
"cursor-pointer": !props.disabled,
|
8744
|
-
"text-
|
8745
|
-
"hover:text-primary-default": !props.disabled
|
8751
|
+
"text-primary-intense cursor-pointer hover:text-primary-default": !props.disabled,
|
8752
|
+
"text-inactive cursor-not-allowed": props.disabled
|
8746
8753
|
})
|
8747
8754
|
}, props), icon && /* @__PURE__ */ import_react43.default.createElement(InlineIcon, {
|
8748
8755
|
icon
|
@@ -8759,7 +8766,7 @@ var Toggle = import_react43.default.forwardRef((_a, ref) => {
|
|
8759
8766
|
}, props), {
|
8760
8767
|
className: tw("grow-0 leading-none", { "cursor-not-allowed": (_a2 = props.disabled) != null ? _a2 : false })
|
8761
8768
|
}), /* @__PURE__ */ import_react43.default.createElement(InlineIcon, {
|
8762
|
-
color: props.disabled ? "
|
8769
|
+
color: props.disabled ? "inactive" : "default",
|
8763
8770
|
icon: hasFocus ? import_search2.default : isOpen ? import_chevronUp4.default : import_chevronDown5.default
|
8764
8771
|
}));
|
8765
8772
|
});
|
@@ -8823,8 +8830,9 @@ var Step = (_a) => {
|
|
8823
8830
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
8824
8831
|
return /* @__PURE__ */ import_react44.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
8825
8832
|
className: classNames(
|
8826
|
-
tw("flex flex-col items-center
|
8827
|
-
"text-
|
8833
|
+
tw("flex flex-col items-center relative text-center", {
|
8834
|
+
"text-intense": state !== "inactive",
|
8835
|
+
"text-inactive": state === "inactive"
|
8828
8836
|
}),
|
8829
8837
|
className
|
8830
8838
|
)
|
@@ -8836,7 +8844,7 @@ var getClassNames = (state) => tw("h-[32px] w-[32px] border-2", {
|
|
8836
8844
|
"text-white bg-success-default border-success-intense": state === "completed"
|
8837
8845
|
});
|
8838
8846
|
var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
8839
|
-
"bg-intense
|
8847
|
+
"bg-body-intense": state === "active",
|
8840
8848
|
"bg-intense": state === "inactive",
|
8841
8849
|
"text-success-default": state === "completed"
|
8842
8850
|
});
|
@@ -8887,7 +8895,7 @@ var Switch = import_react45.default.forwardRef(
|
|
8887
8895
|
})), /* @__PURE__ */ import_react45.default.createElement("span", {
|
8888
8896
|
className: tw(
|
8889
8897
|
"pointer-events-none rounded-full absolute inline-flex justify-center items-center transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
8890
|
-
"bg-white left-2 peer-checked/switch:left-1 text-
|
8898
|
+
"bg-white left-2 peer-checked/switch:left-1 text-inactive peer-checked/switch:text-primary-muted",
|
8891
8899
|
{
|
8892
8900
|
"shadow-4dp": !disabled
|
8893
8901
|
}
|