@ostack.tech/ui 0.8.2 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/chunks/{en-BfgHKQwn.js → en-Dem8nwZz.js} +20 -6
  2. package/dist/chunks/en-Dem8nwZz.js.map +1 -0
  3. package/dist/chunks/platformUtils-C3IHCr90.js +6 -0
  4. package/dist/chunks/platformUtils-C3IHCr90.js.map +1 -0
  5. package/dist/locales/en-GB.js +4 -4
  6. package/dist/locales/en-GB.js.map +1 -1
  7. package/dist/locales/en-US.js +4 -4
  8. package/dist/locales/en-US.js.map +1 -1
  9. package/dist/locales/fr-FR.js +49 -8
  10. package/dist/locales/fr-FR.js.map +1 -1
  11. package/dist/locales/pt-PT.js +35 -8
  12. package/dist/locales/pt-PT.js.map +1 -1
  13. package/dist/ostack-ui.css +39 -10
  14. package/dist/ostack-ui.css.map +1 -1
  15. package/dist/ostack-ui.js +804 -352
  16. package/dist/ostack-ui.js.map +1 -1
  17. package/dist/types/components/Alert/Alert.d.ts +1 -1
  18. package/dist/types/components/Button/Button.d.ts +20 -0
  19. package/dist/types/components/Calendar/Calendar.d.ts +9 -6
  20. package/dist/types/components/Calendar/CalendarContext.d.ts +4 -1
  21. package/dist/types/components/Calendar/{CalendarMonthCaption.d.ts → CalendarHeader.d.ts} +1 -1
  22. package/dist/types/components/CheckboxGroup/CheckboxGroupContext.d.ts +62 -4
  23. package/dist/types/components/CommandMenu/CommandMenuItem.d.ts +1 -1
  24. package/dist/types/components/DateInput/DateInput.d.ts +10 -17
  25. package/dist/types/components/DateRangeInput/DateRangeInput.d.ts +11 -13
  26. package/dist/types/components/DropdownMenu/DropdownMenuCheckboxItem.d.ts +1 -1
  27. package/dist/types/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
  28. package/dist/types/components/DropdownMenu/DropdownMenuRadioItem.d.ts +1 -1
  29. package/dist/types/components/IconButton/IconButton.d.ts +24 -7
  30. package/dist/types/components/Keybinds/Key.d.ts +9 -0
  31. package/dist/types/components/Keybinds/KeyPress.d.ts +7 -0
  32. package/dist/types/components/Keybinds/Keybind.d.ts +7 -0
  33. package/dist/types/components/Keybinds/Keybinds.d.ts +20 -0
  34. package/dist/types/components/Keybinds/index.d.ts +1 -0
  35. package/dist/types/components/Label/Label.d.ts +0 -2
  36. package/dist/types/components/MenuList/MenuListItem.d.ts +15 -0
  37. package/dist/types/components/Spinner/Spinner.d.ts +2 -8
  38. package/dist/types/components/Tabs/TabList.d.ts +10 -1
  39. package/dist/types/components/Toast/Toast.d.ts +9 -0
  40. package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +20 -2
  41. package/dist/types/index.d.ts +1 -0
  42. package/dist/types/locales/en.d.ts +1 -1
  43. package/dist/types/providers/LocalizationProvider/LocalizationObject.d.ts +10 -6
  44. package/dist/types/utils/intersperse.d.ts +8 -0
  45. package/dist/types/utils/keyboardShortcut.d.ts +21 -8
  46. package/dist/types/utils/parseDateStrict.d.ts +3 -1
  47. package/dist/types/utils/platformUtils.d.ts +2 -0
  48. package/dist/types/utils/useDateTransformer.d.ts +10 -31
  49. package/package.json +4 -4
  50. package/scss/_utils.scss +1 -0
  51. package/scss/components/Button/_Button.scss +5 -0
  52. package/scss/components/Calendar/_Calendar-variables.scss +16 -16
  53. package/scss/components/Calendar/_Calendar.scss +16 -16
  54. package/scss/components/IconButton/_IconButton.scss +5 -0
  55. package/scss/components/Keyboard/_Keyboard-variables.scss +18 -0
  56. package/scss/components/Keyboard/_Keyboard.scss +13 -10
  57. package/scss/components/Link/_Link-variables.scss +7 -0
  58. package/scss/components/Link/_Link.scss +7 -0
  59. package/scss/components/MenuList/_MenuList.scss +4 -0
  60. package/scss/components/Tooltip/_Tooltip-variables.scss +4 -0
  61. package/scss/components/Tooltip/_Tooltip.scss +1 -0
  62. package/scss/scss/helpers/_visually-hidden.scss +14 -2
  63. package/scss/scss/placeholders/button/_button-variables.scss +4 -0
  64. package/scss/scss/placeholders/button/_button.scss +4 -0
  65. package/scss/scss/placeholders/menu/_menu-variables.scss +92 -1
  66. package/scss/scss/placeholders/menu/_menu.scss +61 -1
  67. package/dist/chunks/en-BfgHKQwn.js.map +0 -1
@@ -176,12 +176,61 @@ $menu-item-icon-subtle-highlighted-selected-color: null !default;
176
176
  // Item icon - Subtle variant - Highlighted + Selected + Accent
177
177
  $menu-item-icon-subtle-highlighted-selected-accent-color: null !default;
178
178
 
179
+ // Item shortcut
180
+ $menu-item-keybinds-margin-x: $menu-item-padding-x !default;
181
+ $menu-item-keybinds-font-size: var(--#{$prefix}font-size-xs) !default;
182
+ $menu-item-keybinds-line-height: var(--#{$prefix}line-height-xs) !default;
183
+ $menu-item-keybinds-color: var(--#{$prefix}neutral-11) !default;
184
+
185
+ // Item shortcut - Solid variant - Accent
186
+ $menu-item-keybinds-solid-accent-color: var(--#{$prefix}accent-10) !default;
187
+
188
+ // Item shortcut - Solid variant - Highlighted
189
+ $menu-item-keybinds-solid-highlighted-color: $menu-item-icon-solid-highlighted-color !default;
190
+
191
+ // Item shortcut - Solid variant - Highlighted + Accent
192
+ $menu-item-keybinds-solid-highlighted-accent-color: $menu-item-icon-solid-highlighted-accent-color !default;
193
+
194
+ // Item shortcut - Solid variant - Selected
195
+ $menu-item-keybinds-solid-selected-color: $menu-item-icon-solid-selected-color !default;
196
+
197
+ // Item shortcut - Solid variant - Selected + Accent
198
+ $menu-item-keybinds-solid-selected-accent-color: $menu-item-icon-solid-selected-accent-color !default;
199
+
200
+ // Item shortcut - Solid variant - Highlighted + Selected
201
+ $menu-item-keybinds-solid-highlighted-selected-color: $menu-item-icon-solid-highlighted-selected-color !default;
202
+
203
+ // Item shortcut - Solid variant - Highlighted + Selected + Accent
204
+ $menu-item-keybinds-solid-highlighted-selected-accent-color: $menu-item-icon-solid-highlighted-selected-accent-color !default;
205
+
206
+ // Item shortcut - Subtle variant - Accent
207
+ $menu-item-keybinds-subtle-accent-color: var(--#{$prefix}accent-11) !default;
208
+
209
+ // Item shortcut - Subtle variant - Highlighted
210
+ $menu-item-keybinds-subtle-highlighted-color: null !default;
211
+
212
+ // Item shortcut - Subtle variant - Highlighted + Accent
213
+ $menu-item-keybinds-subtle-highlighted-accent-color: null !default;
214
+
215
+ // Item shortcut - Subtle variant - Selected
216
+ $menu-item-keybinds-subtle-selected-color: var(--#{$prefix}neutral-12) !default;
217
+
218
+ // Item shortcut - Subtle variant - Selected + Accent
219
+ $menu-item-keybinds-subtle-selected-accent-color: var(
220
+ --#{$prefix}accent-12
221
+ ) !default;
222
+
223
+ // Item shortcut - Subtle variant - Highlighted + Selected
224
+ $menu-item-keybinds-subtle-highlighted-selected-color: null !default;
225
+
226
+ // Item shortcut - Subtle variant - Highlighted + Selected + Accent
227
+ $menu-item-keybinds-subtle-highlighted-selected-accent-color: null !default;
228
+
179
229
  // Sub trigger icon
180
230
  $menu-sub-trigger-icon-font-size: var(--#{$prefix}font-size-2xs) !default;
181
231
 
182
232
  // Checkable
183
233
  $menu-checkable-size: 16px !default;
184
- $menu-checkable-margin-x: spacing(3) !default;
185
234
  $menu-checkable-border-radius: var(--#{$prefix}border-radius-sm) !default;
186
235
  $menu-checkable-border-width: 1px !default;
187
236
  $menu-checkable-font-size: var(--#{$prefix}font-size-xs) !default;
@@ -312,6 +361,48 @@ $menu-item-icon-highlighted-selected-accent-color-by-variant: (
312
361
  subtle: $menu-item-icon-subtle-highlighted-selected-accent-color,
313
362
  ) !default;
314
363
 
364
+ // Item shortcut - Accent
365
+ $menu-item-keybinds-accent-color-by-variant: (
366
+ solid: $menu-item-keybinds-solid-accent-color,
367
+ subtle: $menu-item-keybinds-subtle-accent-color,
368
+ ) !default;
369
+
370
+ // Item shortcut - Highlighted
371
+ $menu-item-keybinds-highlighted-color-by-variant: (
372
+ solid: $menu-item-keybinds-solid-highlighted-color,
373
+ subtle: $menu-item-keybinds-subtle-highlighted-color,
374
+ ) !default;
375
+
376
+ // Item shortcut - Highlighted + Accent
377
+ $menu-item-keybinds-highlighted-accent-color-by-variant: (
378
+ solid: $menu-item-keybinds-solid-highlighted-accent-color,
379
+ subtle: $menu-item-keybinds-subtle-highlighted-accent-color,
380
+ ) !default;
381
+
382
+ // Item shortcut - Selected
383
+ $menu-item-keybinds-selected-color-by-variant: (
384
+ solid: $menu-item-keybinds-solid-selected-color,
385
+ subtle: $menu-item-keybinds-subtle-selected-color,
386
+ ) !default;
387
+
388
+ // Item shortcut - Selected + Accent
389
+ $menu-item-keybinds-selected-accent-color-by-variant: (
390
+ solid: $menu-item-keybinds-solid-selected-accent-color,
391
+ subtle: $menu-item-keybinds-subtle-selected-accent-color,
392
+ ) !default;
393
+
394
+ // Item shortcut - Highlighted + Selected
395
+ $menu-item-keybinds-highlighted-selected-color-by-variant: (
396
+ solid: $menu-item-keybinds-solid-highlighted-selected-color,
397
+ subtle: $menu-item-keybinds-subtle-highlighted-selected-color,
398
+ ) !default;
399
+
400
+ // Item shortcut - Highlighted + Selected + Accent
401
+ $menu-item-keybinds-highlighted-selected-accent-color-by-variant: (
402
+ solid: $menu-item-keybinds-solid-highlighted-selected-accent-color,
403
+ subtle: $menu-item-keybinds-subtle-highlighted-selected-accent-color,
404
+ ) !default;
405
+
315
406
  // Checkable indicator - Highlighted
316
407
  $menu-checkable-indicator-highlighted-color-by-variant: (
317
408
  solid: $menu-checkable-indicator-solid-highlighted-color,
@@ -121,6 +121,12 @@
121
121
  --#{$prefix}menu-item-icon-color,
122
122
  map.get($menu-item-icon-accent-color-by-variant, $variant)
123
123
  );
124
+
125
+ // Item shortcut - Accent
126
+ @include declare-var(
127
+ --#{$prefix}menu-item-keybinds-color,
128
+ map.get($menu-item-keybinds-accent-color-by-variant, $variant)
129
+ );
124
130
  }
125
131
 
126
132
  // Item - Highlighted
@@ -145,6 +151,12 @@
145
151
  map.get($menu-item-icon-highlighted-color-by-variant, $variant)
146
152
  );
147
153
 
154
+ // Item shortcut - Highlighted
155
+ @include declare-var(
156
+ --#{$prefix}menu-item-keybinds-color,
157
+ map.get($menu-item-keybinds-highlighted-color-by-variant, $variant)
158
+ );
159
+
148
160
  // Checkable indicator - Highlighted
149
161
  @include declare-var(
150
162
  --#{$prefix}menu-checkable-indicator-color,
@@ -177,6 +189,15 @@
177
189
  )
178
190
  );
179
191
 
192
+ // Item shortcut - Highlighted + Accent
193
+ @include declare-var(
194
+ --#{$prefix}menu-item-keybinds-color,
195
+ map.get(
196
+ $menu-item-keybinds-highlighted-accent-color-by-variant,
197
+ $variant
198
+ )
199
+ );
200
+
180
201
  // Checkable indicator - Highlighted + Accent
181
202
  @include declare-var(
182
203
  --#{$prefix}menu-checkable-indicator-color,
@@ -214,6 +235,12 @@
214
235
  map.get($menu-item-icon-selected-color-by-variant, $variant)
215
236
  );
216
237
 
238
+ // Item shortcut - Selected
239
+ @include declare-var(
240
+ --#{$prefix}menu-item-keybinds-color,
241
+ map.get($menu-item-keybinds-selected-color-by-variant, $variant)
242
+ );
243
+
217
244
  // Item - Selected + Accent
218
245
  &[data-accent] {
219
246
  @include declare-var(
@@ -236,6 +263,15 @@
236
263
  $variant
237
264
  )
238
265
  );
266
+
267
+ // Item shortcut - Selected + Accent
268
+ @include declare-var(
269
+ --#{$prefix}menu-item-keybinds-color,
270
+ map.get(
271
+ $menu-item-keybinds-selected-accent-color-by-variant,
272
+ $variant
273
+ )
274
+ );
239
275
  }
240
276
  }
241
277
 
@@ -260,6 +296,15 @@
260
296
  )
261
297
  );
262
298
 
299
+ // Item shortcut - Highlighted + Selected
300
+ @include declare-var(
301
+ --#{$prefix}menu-item-keybinds-color,
302
+ map.get(
303
+ $menu-item-keybinds-highlighted-selected-color-by-variant,
304
+ $variant
305
+ )
306
+ );
307
+
263
308
  // Item - Highlighted + Selected + Accent
264
309
  &[data-accent] {
265
310
  @include declare-var(
@@ -278,6 +323,15 @@
278
323
  $variant
279
324
  )
280
325
  );
326
+
327
+ // Item shortcut - Highlighted + Selected + Accent
328
+ @include declare-var(
329
+ --#{$prefix}menu-item-keybinds-color,
330
+ map.get(
331
+ $menu-item-keybinds-highlighted-selected-accent-color-by-variant,
332
+ $variant
333
+ )
334
+ );
281
335
  }
282
336
  }
283
337
  }
@@ -323,6 +377,13 @@
323
377
  }
324
378
  }
325
379
 
380
+ &__item-keybinds {
381
+ margin-left: $menu-item-keybinds-margin-x;
382
+ font-size: $menu-item-keybinds-font-size;
383
+ line-height: $menu-item-keybinds-line-height;
384
+ color: var(--#{$prefix}menu-item-keybinds-color, $menu-item-keybinds-color);
385
+ }
386
+
326
387
  &__sub-trigger-icon {
327
388
  font-size: $menu-sub-trigger-icon-font-size;
328
389
  }
@@ -336,7 +397,6 @@
336
397
  width: $menu-checkable-size;
337
398
  height: $menu-checkable-size;
338
399
 
339
- margin-left: $menu-checkable-margin-x;
340
400
  border-radius: $menu-checkable-border-radius;
341
401
  border: $menu-checkable-border-width solid
342
402
  var(--#{$prefix}menu-item-icon-color, $menu-item-icon-color);
@@ -1 +0,0 @@
1
- {"version":3,"file":"en-BfgHKQwn.js","sources":["../../src/locales/en.tsx"],"sourcesContent":["import type { LocalizationObject } from \"../providers/LocalizationProvider\";\n\n/** `en` locale (partial). */\nexport const en: Omit<LocalizationObject, \"languageTag\" | \"dateFnsLocale\"> = {\n AlertDialog: {\n okText: \"OK\",\n },\n Calendar: {\n previousMonthLabel: \"Previous month\",\n nextMonthLabel: \"Next month\",\n },\n CloseButton: {\n label: \"Close\",\n },\n CommandMenu: {\n searchPlaceholder: \"Search…\",\n listLabel: \"Suggestions\",\n loadingLabel: \"Loading…\",\n emptyMessage: \"No results found.\",\n },\n CommandMenuDialog: {\n title: \"Command palette\",\n description: \"Search for a command…\",\n },\n ConfirmDialog: {\n cancelText: \"Cancel\",\n },\n ControlCode: {\n visuallyHiddenPrefix: \"Field\",\n },\n DataTable: {\n emptyMessage: \"Nothing to show.\",\n },\n DataTableFilter: {\n \"aria-label\": \"Table filter\",\n placeholder: \"Filter\",\n },\n DataTablePagination: {\n rowsRange: (range, total) => (\n <>\n Rows&nbsp;{range}&nbsp;of {total}\n </>\n ),\n previousPageButtonLabel: \"Previous page\",\n nextPageButtonLabel: \"Next page\",\n },\n DataTableRowsPerPage: {\n label: \"Rows per page\",\n },\n DateInput: {\n calendarButtonLabel: (selectedDate, editable) =>\n editable\n ? selectedDate\n ? `Open calendar to change selected date: ${selectedDate}`\n : \"Open calendar to select date\"\n : selectedDate\n ? `Open calendar with selected date: ${selectedDate}`\n : \"Open calendar with no selected date\",\n },\n DateRangeInput: {\n startInputLabel: \"Start date\",\n endInputLabel: \"End date\",\n calendarButtonLabel: (selectedDateRange, editable) =>\n editable\n ? selectedDateRange\n ? `Open calendar to change selected date-range: ${selectedDateRange}`\n : \"Open calendar to select date-range\"\n : selectedDateRange\n ? `Open calendar with selected date-range: ${selectedDateRange}`\n : \"Open calendar with no selected date-range\",\n },\n ErrorBoundary: {\n fallbackMessage: (\n <>\n Something went wrong.\n <br />\n Press the button on the right to try again. If the problem persists,\n please try again later.\n </>\n ),\n resetButtonLabel: \"Retry\",\n },\n Feedback: {\n visuallyHiddenPrefix: (type) =>\n type === \"error\" ? \"Error:\" : type === \"warning\" ? \"Warning:\" : null,\n },\n FeedbackPopover: {\n label: \"Show feedback\",\n },\n FieldGroupHeader: {\n visuallyHiddenCodePrefix: \"Group\",\n },\n Input: {\n loadingDescription: \"Loading…\",\n clearButtonLabel: \"Clear\",\n },\n Label: {\n requiredIconLabel: \"Required\",\n helperButtonLabel: \"Show help\",\n },\n NumericInput: {\n decimalSeparator: \".\",\n groupingStyle: \"thousand\",\n groupSeparator: \",\",\n },\n Select: {\n optionsLabel: \"Options\",\n },\n TableColumn: {\n helperButtonLabel: \"Show help\",\n },\n TableHead: {\n sortByColumnDescription: (columnName, sortDirection) =>\n sortDirection === null\n ? `Stop sorting table by column “${columnName}”`\n : `Sort table by column “${columnName}” in ${\n sortDirection === \"asc\" ? \"ascending\" : \"descending\"\n } order`,\n },\n ToastProvider: {\n label: \"Notification\",\n },\n ToastViewport: {\n label: \"Notifications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