origam 2.17.1 → 2.18.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.
- package/CHANGELOG.md +895 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +193 -26
- package/dist/src/assets/css/tokens/light.css +78 -11
- package/dist/src/assets/locales/en.json +21 -6
- package/dist/src/assets/locales/fr.json +21 -6
- package/dist/src/assets/scss/main.scss +10 -2
- package/dist/src/assets/scss/tokens/_dark.scss +2914 -13
- package/dist/src/assets/scss/tokens/_light.scss +78 -11
- package/dist/src/components/Alert/OrigamAlert.vue +6 -6
- package/dist/src/components/Avatar/OrigamAvatar.vue +15 -2
- package/dist/src/components/Badge/OrigamBadge.vue +7 -7
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +23 -4
- package/dist/src/components/Btn/OrigamBtn.vue +22 -16
- package/dist/src/components/Btn/OrigamBtnGroup.vue +1 -1
- package/dist/src/components/Calendar/OrigamCalendar.vue +1 -1
- package/dist/src/components/Card/OrigamCard.vue +2 -0
- package/dist/src/components/Card/OrigamCardHeader.vue +7 -7
- package/dist/src/components/Carousel/OrigamCarousel.vue +14 -1
- package/dist/src/components/Chart/OrigamChartBoxPlot.vue +1 -1
- package/dist/src/components/Chart/OrigamChartBullet.vue +3 -2
- package/dist/src/components/Chart/OrigamChartCandlestick.vue +2 -2
- package/dist/src/components/Chart/OrigamChartCartesian.vue +49 -4
- package/dist/src/components/Chart/OrigamChartLegend.vue +39 -18
- package/dist/src/components/Chart/OrigamChartPareto.vue +7 -1
- package/dist/src/components/Chart/OrigamChartPictorial.vue +2 -2
- package/dist/src/components/Chart/OrigamChartRadar.vue +3 -1
- package/dist/src/components/Chart/OrigamChartSparkline.vue +3 -1
- package/dist/src/components/Chart/OrigamChartStreamgraph.vue +2 -1
- package/dist/src/components/Checkbox/OrigamCheckbox.vue +2 -0
- package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +36 -11
- package/dist/src/components/Chip/OrigamChip.vue +19 -4
- package/dist/src/components/Code/OrigamCode.vue +20 -3
- package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +30 -5
- package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +3 -3
- package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +6 -6
- package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +0 -4
- package/dist/src/components/DataList/OrigamDataList.vue +2 -0
- package/dist/src/components/DataList/OrigamDataText.vue +6 -6
- package/dist/src/components/DataList/OrigamDataTitle.vue +6 -6
- package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +1 -1
- package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +4 -1
- package/dist/src/components/DatePicker/OrigamDatePicker.vue +2 -0
- package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +6 -6
- package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +21 -1
- package/dist/src/components/Dialog/OrigamDialog.vue +25 -0
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +6 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +2 -0
- package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +6 -6
- package/dist/src/components/Field/OrigamField.vue +47 -15
- package/dist/src/components/FileField/OrigamFileField.vue +5 -1
- package/dist/src/components/Icon/OrigamSvgIcon.vue +3 -1
- package/dist/src/components/Img/OrigamImg.vue +9 -2
- package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +34 -18
- package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +46 -5
- package/dist/src/components/Input/OrigamInput.vue +6 -6
- package/dist/src/components/List/OrigamListGroup.vue +4 -0
- package/dist/src/components/List/OrigamListItem.vue +68 -4
- package/dist/src/components/Masonry/OrigamMasonry.vue +18 -2
- package/dist/src/components/Menu/OrigamMenu.vue +79 -9
- package/dist/src/components/NumberField/OrigamNumberField.vue +13 -3
- package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +35 -11
- package/dist/src/components/PasswordField/OrigamPasswordField.vue +5 -1
- package/dist/src/components/Radio/OrigamRadio.vue +2 -0
- package/dist/src/components/Radio/OrigamRadioGroup.vue +36 -11
- package/dist/src/components/RatingField/OrigamRatingField.vue +58 -7
- package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +78 -30
- package/dist/src/components/Select/OrigamSelect.vue +44 -21
- package/dist/src/components/SliderField/OrigamSliderField.vue +20 -10
- package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +1 -1
- package/dist/src/components/Switch/OrigamSwitch.vue +2 -0
- package/dist/src/components/Tabs/OrigamTab.vue +7 -4
- package/dist/src/components/Tabs/OrigamTabPanel.vue +4 -2
- package/dist/src/components/Tabs/OrigamTabs.vue +7 -5
- package/dist/src/components/TextField/OrigamTextField.vue +5 -1
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +5 -1
- package/dist/src/components/Transition/OrigamExpandX.vue +19 -3
- package/dist/src/components/Transition/OrigamExpandY.vue +19 -3
- package/dist/src/components/Transition/OrigamTranslateScale.vue +26 -4
- package/dist/src/components/Video/OrigamVideo.vue +3 -2
- package/dist/src/components/Window/OrigamWindow.vue +20 -3
- package/dist/src/composables/Commons/accessibleCommand.composable.cjs +26 -0
- package/dist/src/composables/Commons/accessibleCommand.composable.d.ts +78 -0
- package/dist/src/composables/Commons/accessibleCommand.composable.js +20 -0
- package/dist/src/composables/Commons/activator.composable.cjs +10 -1
- package/dist/src/composables/Commons/activator.composable.js +11 -2
- package/dist/src/composables/Commons/adjacent.composable.cjs +17 -0
- package/dist/src/composables/Commons/adjacent.composable.d.ts +12 -0
- package/dist/src/composables/Commons/adjacent.composable.js +17 -0
- package/dist/src/composables/Commons/adjacentInner.composable.cjs +20 -0
- package/dist/src/composables/Commons/adjacentInner.composable.d.ts +24 -5
- package/dist/src/composables/Commons/adjacentInner.composable.js +20 -0
- package/dist/src/composables/Commons/audio.composable.cjs +14 -1
- package/dist/src/composables/Commons/audio.composable.js +14 -1
- package/dist/src/composables/Commons/backButton.composable.cjs +3 -1
- package/dist/src/composables/Commons/backButton.composable.js +3 -1
- package/dist/src/composables/Commons/border.composable.d.ts +13 -0
- package/dist/src/composables/Commons/colorEffect.composable.cjs +58 -46
- package/dist/src/composables/Commons/colorEffect.composable.d.ts +10 -5
- package/dist/src/composables/Commons/colorEffect.composable.js +70 -46
- package/dist/src/composables/Commons/createLayout.composable.cjs +21 -12
- package/dist/src/composables/Commons/createLayout.composable.js +21 -12
- package/dist/src/composables/Commons/delay.composable.d.ts +16 -0
- package/dist/src/composables/Commons/dimension.composable.d.ts +11 -0
- package/dist/src/composables/Commons/elevation.composable.cjs +6 -2
- package/dist/src/composables/Commons/elevation.composable.d.ts +37 -1
- package/dist/src/composables/Commons/elevation.composable.js +7 -2
- package/dist/src/composables/Commons/goTo.composable.cjs +4 -2
- package/dist/src/composables/Commons/goTo.composable.js +5 -3
- package/dist/src/composables/Commons/group.composable.cjs +14 -14
- package/dist/src/composables/Commons/group.composable.js +14 -14
- package/dist/src/composables/Commons/hotkey.composable.d.ts +18 -7
- package/dist/src/composables/Commons/hydration.composable.d.ts +8 -0
- package/dist/src/composables/Commons/link.composable.d.ts +20 -0
- package/dist/src/composables/Commons/locationStrategies.composable.d.ts +17 -0
- package/dist/src/composables/Commons/message.composable.d.ts +19 -5
- package/dist/src/composables/Commons/position.composable.d.ts +17 -6
- package/dist/src/composables/Commons/refs.composable.d.ts +11 -5
- package/dist/src/composables/Commons/rounded.composable.d.ts +11 -1
- package/dist/src/composables/Commons/scrolling.composable.cjs +15 -12
- package/dist/src/composables/Commons/scrolling.composable.js +15 -12
- package/dist/src/composables/Commons/size.composable.d.ts +15 -0
- package/dist/src/composables/Commons/ssrBoot.composable.cjs +9 -1
- package/dist/src/composables/Commons/ssrBoot.composable.js +10 -2
- package/dist/src/composables/Commons/stack.composable.cjs +13 -1
- package/dist/src/composables/Commons/stack.composable.js +13 -1
- package/dist/src/composables/Commons/theme-props-resolver.composable.cjs +41 -32
- package/dist/src/composables/Commons/theme-props-resolver.composable.js +41 -32
- package/dist/src/composables/Commons/validation.composable.cjs +3 -3
- package/dist/src/composables/Commons/validation.composable.js +3 -3
- package/dist/src/composables/Commons/virtual.composable.cjs +24 -8
- package/dist/src/composables/Commons/virtual.composable.js +24 -8
- package/dist/src/composables/Masonry/masonry.composable.cjs +18 -11
- package/dist/src/composables/Masonry/masonry.composable.js +18 -11
- package/dist/src/composables/Parallax/parallax.composable.cjs +1 -1
- package/dist/src/composables/Parallax/parallax.composable.js +1 -1
- package/dist/src/composables/index.cjs +36 -0
- package/dist/src/composables/index.d.ts +3 -0
- package/dist/src/composables/index.js +3 -0
- package/dist/src/consts/Chart/chart-cartesian.const.cjs +5 -2
- package/dist/src/consts/Chart/chart-cartesian.const.d.ts +42 -0
- package/dist/src/consts/Chart/chart-cartesian.const.js +3 -0
- package/dist/src/consts/Commons/elevation.const.cjs +5 -1
- package/dist/src/consts/Commons/elevation.const.d.ts +52 -2
- package/dist/src/consts/Commons/elevation.const.js +4 -0
- package/dist/src/consts/Commons/ripple.const.cjs +13 -3
- package/dist/src/consts/Commons/ripple.const.js +13 -3
- package/dist/src/consts/RatingField/rating-field.const.cjs +10 -0
- package/dist/src/consts/RatingField/rating-field.const.d.ts +36 -0
- package/dist/src/consts/RatingField/rating-field.const.js +12 -0
- package/dist/src/consts/index.cjs +11 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/index.js +1 -0
- package/dist/src/directives/ClickOutside/clickOutside.directive.cjs +2 -0
- package/dist/src/directives/ClickOutside/clickOutside.directive.js +2 -0
- package/dist/src/directives/Ripple/ripple.directive.cjs +2 -0
- package/dist/src/directives/Ripple/ripple.directive.js +2 -0
- package/dist/src/enums/Commons/color.enum.cjs +0 -1
- package/dist/src/enums/Commons/color.enum.d.ts +14 -5
- package/dist/src/enums/Commons/color.enum.js +0 -1
- package/dist/src/enums/Sheet/sheet.enum.d.ts +1 -1
- package/dist/src/interfaces/Btn/btn.interface.d.ts +7 -10
- package/dist/src/interfaces/Chart/chart-cartesian.interface.d.ts +6 -2
- package/dist/src/interfaces/Commons/activator.interface.d.ts +3 -2
- package/dist/src/interfaces/Commons/adjacent.interface.d.ts +29 -0
- package/dist/src/interfaces/Commons/group.interface.d.ts +13 -2
- package/dist/src/interfaces/Commons/ripple.interface.d.ts +16 -0
- package/dist/src/interfaces/Commons/scroll.interface.d.ts +3 -2
- package/dist/src/interfaces/DataTable/data-table-header.interface.d.ts +2 -2
- package/dist/src/interfaces/DatePicker/date-picker-month.interface.d.ts +2 -1
- package/dist/src/interfaces/Menu/menu.interface.d.ts +28 -1
- package/dist/src/interfaces/OtpInputField/otp-input-field.interface.d.ts +21 -1
- package/dist/src/interfaces/RatingField/rating-field-item.interface.d.ts +16 -1
- package/dist/src/interfaces/index.cjs +11 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/nuxt/module.cjs +2 -1
- package/dist/src/nuxt/module.js +2 -1
- package/dist/src/origam.cjs +1 -2
- package/dist/src/origam.js +1 -2
- package/dist/src/themes/origam.theme.cjs +8 -14
- package/dist/src/themes/origam.theme.js +6 -8
- package/dist/src/types/Commons/color.type.d.ts +4 -3
- package/dist/src/types/Commons/commons.type.d.ts +33 -0
- package/dist/src/types/Commons/theme.type.d.ts +2 -1
- package/dist/src/types/Sheet/sheet.type.d.ts +2 -1
- package/dist/src/types/index.cjs +22 -0
- package/dist/src/types/index.d.ts +2 -0
- package/dist/src/types/index.js +2 -0
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Commons/a11y.util.cjs +35 -0
- package/dist/src/utils/Commons/a11y.util.d.ts +63 -0
- package/dist/src/utils/Commons/a11y.util.js +33 -0
- package/dist/src/utils/Commons/clickOutside.util.cjs +5 -1
- package/dist/src/utils/Commons/clickOutside.util.js +5 -1
- package/dist/src/utils/Commons/color.util.cjs +10 -15
- package/dist/src/utils/Commons/color.util.d.ts +34 -28
- package/dist/src/utils/Commons/color.util.js +9 -16
- package/dist/src/utils/Commons/goTo.util.cjs +31 -14
- package/dist/src/utils/Commons/goTo.util.d.ts +1 -1
- package/dist/src/utils/Commons/goTo.util.js +31 -16
- package/dist/src/utils/Commons/location.util.cjs +18 -3
- package/dist/src/utils/Commons/location.util.js +18 -3
- package/dist/src/utils/Commons/ripple.util.cjs +5 -1
- package/dist/src/utils/Commons/ripple.util.js +5 -1
- package/dist/src/utils/index.cjs +11 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/package.json +13 -2
- package/dist/src/consts/Btn/btn.const.cjs +0 -7
- package/dist/src/consts/Btn/btn.const.d.ts +0 -32
- package/dist/src/consts/Btn/btn.const.js +0 -1
- package/dist/src/types/Commons/locale.type.cjs +0 -1
- package/dist/src/types/Commons/locale.type.d.ts +0 -0
- package/dist/src/types/Commons/locale.type.js +0 -0
|
@@ -11,16 +11,78 @@
|
|
|
11
11
|
* This file is now HAND-MAINTAINED SOURCE: edit it directly. There is no
|
|
12
12
|
* regeneration step, and no "do not edit" rule any more. A design-token
|
|
13
13
|
* pipeline may be reintroduced later, once the DS is stable.
|
|
14
|
+
*
|
|
15
|
+
* ── #789 — CONTRASTE : POURQUOI CES PALIERS-LÀ ─────────────────────────────
|
|
16
|
+
* `feedback--{success,warning,info}---bg` portent tous un `---fg` BLANC. Le
|
|
17
|
+
* couple doit donc tenir 4.5:1 (WCAG AA, texte). Mesuré en Chromium, alpha
|
|
18
|
+
* composité, avec témoins calculables à la main :
|
|
19
|
+
*
|
|
20
|
+
* success green-500 #4caf50 2.78 → green-700 #15803d 5.02
|
|
21
|
+
* warning amber-600 #fb8c00 2.37 → amber-700 #b45309 5.02
|
|
22
|
+
* info blue-500 #2196f3 3.12 → #2563eb 5.17
|
|
23
|
+
*
|
|
24
|
+
* ⛔ Ne pas « re-éclaircir » ces trois paliers sans remesurer : sur cette
|
|
25
|
+
* palette, aucun palier plus clair ne tient AA avec du texte blanc. La
|
|
26
|
+
* mesure et ses témoins vivent dans
|
|
27
|
+
* `packages/tests/e2e/token-intent-contrast.spec.ts` — elle rougit ici.
|
|
28
|
+
*
|
|
29
|
+
* `info---bg` est le seul littéral du lot : `#2563eb` n'existe pas dans la
|
|
30
|
+
* palette primitive (son `blue---600` vaut `#1d4ed8`, soit le 700 de
|
|
31
|
+
* Tailwind). La valeur est celle de `origam.theme.ts`, ce qui ferme du même
|
|
32
|
+
* coup la divergence feuille ↔ thème que #793 suit.
|
|
33
|
+
*
|
|
34
|
+
* ── #871 — POURQUOI `[data-mode="light"]` DANS LA LISTE ────────────────────
|
|
35
|
+
* Les ~1 792 déclarations DÉRIVÉES de ce bloc — la forme
|
|
36
|
+
* `--origam-title---color: var(--origam-color__text---primary)` —
|
|
37
|
+
* ne se ré-évaluent QUE sur un élément que ce sélecteur matche. Sur tout autre
|
|
38
|
+
* élément, la valeur héritée est déjà SUBSTITUÉE — c'est la sémantique des
|
|
39
|
+
* custom properties, pas un bug : `--a: var(--b)` posé à `:root`, `--b`
|
|
40
|
+
* réécrit sur un enfant, et `--a` garde sur l'enfant la valeur calculée à la
|
|
41
|
+
* racine.
|
|
42
|
+
*
|
|
43
|
+
* Sans `[data-mode="light"]`, un sous-arbre `<OrigamThemeProvider mode="light">`
|
|
44
|
+
* à l'intérieur d'une page sombre gardait donc les 1 792 dérivés GELÉS sur les
|
|
45
|
+
* valeurs sombres de la racine. C'est le pendant clair du défaut mesuré en
|
|
46
|
+
* sombre par #871.
|
|
47
|
+
*
|
|
48
|
+
* ⛔ SPÉCIFICITÉ (0,1,0), VOLONTAIREMENT. Le bloc runtime d'une marque claire
|
|
49
|
+
* (`applyThemes()` sérialise `[data-theme="cartoon"]` sans `data-mode`) est
|
|
50
|
+
* lui aussi (0,1,0) et est injecté dans `<head>` APRÈS cette feuille : à
|
|
51
|
+
* égalité, l'ordre source tranche et la marque gagne. Monter ce sélecteur à
|
|
52
|
+
* (0,2,0) (p. ex. `[data-mode="light"]:not([data-theme="dark"])`) le ferait
|
|
53
|
+
* perdre, et cette feuille repeindrait par-dessus chaque marque claire.
|
|
54
|
+
*
|
|
55
|
+
* ── #871 — `system-bar` / `tooltip` : RIEN NE CHANGE ICI ──────────────────
|
|
56
|
+
* Ces deux composants peignent une surface SOMBRE dans les deux modes
|
|
57
|
+
* (`neutral---700` / `neutral---800`) et lisent `text---inverse`, qui vaut
|
|
58
|
+
* blanc EN CLAIR — correct, donc inchangé. C'est en SOMBRE que le même token
|
|
59
|
+
* vaut de l'encre et rend le texte illisible ; le correctif est donc dans
|
|
60
|
+
* `dark.css` seul. Voir son en-tête, y compris la piste écartée (passer les
|
|
61
|
+
* DEUX feuilles à `text---onColor`, qui a mesuré +2 violations en clair sur
|
|
62
|
+
* la marque `cartoon`).
|
|
14
63
|
*/
|
|
15
64
|
:root,
|
|
16
|
-
[data-theme="light"]
|
|
65
|
+
[data-theme="light"],
|
|
66
|
+
[data-mode="light"] {
|
|
17
67
|
--origam-color__surface---default: var(--origam-color__neutral---0);
|
|
18
68
|
--origam-color__surface---raised: var(--origam-color__neutral---0);
|
|
19
69
|
--origam-color__surface---overlay: var(--origam-color__neutral---100);
|
|
20
70
|
--origam-color__surface---sunken: var(--origam-color__neutral---50);
|
|
21
71
|
--origam-color__surface---disabled: var(--origam-color__neutral---200);
|
|
22
72
|
--origam-color__surface---inverse: var(--origam-color__neutral---900);
|
|
23
|
-
|
|
73
|
+
/* #615 — `950`, PAS `900`. Cette feuille NE gagne PAS la cascade au niveau
|
|
74
|
+
document : `createOrigam()` appelle `applyThemes()`, qui serialise
|
|
75
|
+
`origamLightTheme` (src/themes/origam.theme.ts) en un bloc `:root { … }`
|
|
76
|
+
injecte dans <head> APRES cette feuille. A specificite egale (0,1,0) c'est
|
|
77
|
+
l'ordre source qui tranche, donc le bloc runtime gagne — et il pose
|
|
78
|
+
`#0a0a0a`, soit neutral-950. Tant que cette ligne disait `900`, le meme
|
|
79
|
+
theme « light » peignait DEUX couleurs : `#0a0a0a` a la racine et
|
|
80
|
+
`#171717` dans un sous-arbre `<OrigamThemeProvider theme="light">` (ou
|
|
81
|
+
`[data-theme="light"]` matche alors que `:root` ne matche plus). Les deux
|
|
82
|
+
valeurs mesurees en Chromium ; le contraste sur `surface.default` passe de
|
|
83
|
+
17.93:1 a 19.80:1. Si cette ligne doit revenir a `900`, c'est
|
|
84
|
+
`origam.theme.ts` qu'il faut changer AVEC, sinon la divergence revient. */
|
|
85
|
+
--origam-color__text---primary: var(--origam-color__neutral---950);
|
|
24
86
|
--origam-color__text---secondary: var(--origam-color__neutral---600);
|
|
25
87
|
--origam-color__text---disabled: var(--origam-color__neutral---400);
|
|
26
88
|
--origam-color__text---inverse: var(--origam-color__neutral---0);
|
|
@@ -48,26 +110,26 @@
|
|
|
48
110
|
--origam-color__action--ghost---bgDisabled: rgba(0, 0, 0, 0);
|
|
49
111
|
--origam-color__action--ghost---fg: var(--origam-color__primary---600);
|
|
50
112
|
--origam-color__action--ghost---fgDisabled: var(--origam-color__neutral---400);
|
|
51
|
-
--origam-color__feedback--success---bg: var(--origam-color__green---
|
|
113
|
+
--origam-color__feedback--success---bg: var(--origam-color__green---700);
|
|
52
114
|
--origam-color__feedback--success---bgSubtle: var(--origam-color__green---50);
|
|
53
115
|
--origam-color__feedback--success---fg: var(--origam-color__neutral---0);
|
|
54
116
|
--origam-color__feedback--success---fgSubtle: var(--origam-color__green---700);
|
|
55
|
-
--origam-color__feedback--success---border: var(--origam-color__green---
|
|
56
|
-
--origam-color__feedback--warning---bg: var(--origam-color__amber---
|
|
117
|
+
--origam-color__feedback--success---border: var(--origam-color__green---700);
|
|
118
|
+
--origam-color__feedback--warning---bg: var(--origam-color__amber---700);
|
|
57
119
|
--origam-color__feedback--warning---bgSubtle: var(--origam-color__amber---50);
|
|
58
120
|
--origam-color__feedback--warning---fg: var(--origam-color__neutral---0);
|
|
59
121
|
--origam-color__feedback--warning---fgSubtle: var(--origam-color__amber---700);
|
|
60
|
-
--origam-color__feedback--warning---border: var(--origam-color__amber---
|
|
122
|
+
--origam-color__feedback--warning---border: var(--origam-color__amber---700);
|
|
61
123
|
--origam-color__feedback--danger---bg: var(--origam-color__red---600);
|
|
62
124
|
--origam-color__feedback--danger---bgSubtle: var(--origam-color__red---50);
|
|
63
125
|
--origam-color__feedback--danger---fg: var(--origam-color__neutral---0);
|
|
64
126
|
--origam-color__feedback--danger---fgSubtle: var(--origam-color__red---700);
|
|
65
127
|
--origam-color__feedback--danger---border: var(--origam-color__red---400);
|
|
66
|
-
--origam-color__feedback--info---bg:
|
|
128
|
+
--origam-color__feedback--info---bg: #2563eb;
|
|
67
129
|
--origam-color__feedback--info---bgSubtle: var(--origam-color__blue---50);
|
|
68
130
|
--origam-color__feedback--info---fg: var(--origam-color__neutral---0);
|
|
69
131
|
--origam-color__feedback--info---fgSubtle: var(--origam-color__blue---700);
|
|
70
|
-
--origam-color__feedback--info---border:
|
|
132
|
+
--origam-color__feedback--info---border: #2563eb;
|
|
71
133
|
--origam-color__overlay---scrim: var(--origam-color---white);
|
|
72
134
|
--origam-gradient---sunset: linear-gradient(135deg, #ff7e5f, #feb47b);
|
|
73
135
|
--origam-gradient---ocean: linear-gradient(135deg, #2193b0, #6dd5ed);
|
|
@@ -89,7 +151,7 @@
|
|
|
89
151
|
--origam-btn---border-style: solid;
|
|
90
152
|
--origam-btn---border-color: currentColor;
|
|
91
153
|
--origam-btn---position: relative;
|
|
92
|
-
--origam-btn---density:
|
|
154
|
+
--origam-btn---density: 0px;
|
|
93
155
|
--origam-btn---width: auto;
|
|
94
156
|
--origam-btn---min-width: 64px;
|
|
95
157
|
--origam-btn---max-width: 100%;
|
|
@@ -920,8 +982,8 @@
|
|
|
920
982
|
--origam-field__input---padding-block-filled: 20px;
|
|
921
983
|
--origam-field__input---padding-top: var(--origam-field__input---padding-block-md);
|
|
922
984
|
--origam-field__input---padding-bottom: var(--origam-field__input---padding-block-md);
|
|
923
|
-
--origam-field__input---padding-start:
|
|
924
|
-
--origam-field__input---padding-end:
|
|
985
|
+
--origam-field__input---padding-start: 0px;
|
|
986
|
+
--origam-field__input---padding-end: 0px;
|
|
925
987
|
--origam-field__input---opacity: 0.7;
|
|
926
988
|
--origam-field__label---font-size: 0.75em;
|
|
927
989
|
--origam-field__label---transition-duration: var(--origam-motion__duration---normal);
|
|
@@ -1431,6 +1493,11 @@
|
|
|
1431
1493
|
--origam-table__header-cell---padding-inline: var(--origam-space---4);
|
|
1432
1494
|
--origam-table__header-cell---border-bottom-color: var(--origam-color__border---default);
|
|
1433
1495
|
--origam-table__header-cell---border-bottom-width: var(--origam-border__width---2);
|
|
1496
|
+
/* #840 — derived from the SAME density-aware padding-block token, so it
|
|
1497
|
+
never drifts out of sync with it: 2 * padding-block + border-bottom
|
|
1498
|
+
+ 18px (measured content-box line height of a single-line header
|
|
1499
|
+
cell in Chromium, constant across the 3 density rungs). */
|
|
1500
|
+
--origam-table__header-cell---height: calc((2 * var(--origam-table__header-cell---padding-block, 12px)) + var(--origam-table__header-cell---border-bottom-width, 2px) + 18px);
|
|
1434
1501
|
--origam-table__cell---padding-block: var(--origam-space---3);
|
|
1435
1502
|
--origam-table__cell---padding-inline: var(--origam-space---4);
|
|
1436
1503
|
--origam-table__cell---border-color: var(--origam-color__border---subtle);
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
<div
|
|
21
21
|
key="prepend"
|
|
22
22
|
class="origam-alert__prepend"
|
|
23
|
-
|
|
24
|
-
:tabindex="isPrependClickable ? 0 : undefined"
|
|
23
|
+
v-bind="prependCommandAttrs"
|
|
25
24
|
@click="handleClickPrepend"
|
|
26
25
|
@keydown="handleKeydownPrepend"
|
|
27
26
|
>
|
|
@@ -71,8 +70,7 @@
|
|
|
71
70
|
<div
|
|
72
71
|
key="append"
|
|
73
72
|
class="origam-alert__append"
|
|
74
|
-
|
|
75
|
-
:tabindex="isAppendClickable ? 0 : undefined"
|
|
73
|
+
v-bind="appendCommandAttrs"
|
|
76
74
|
@click="handleClickAppend"
|
|
77
75
|
@keydown="handleKeydownAppend"
|
|
78
76
|
>
|
|
@@ -202,6 +200,8 @@ const props = defineProps({
|
|
|
202
200
|
appendIcon: { type: null, required: false },
|
|
203
201
|
prependAvatar: { type: String, required: false },
|
|
204
202
|
prependIcon: { type: null, required: false },
|
|
203
|
+
prependAriaLabel: { type: String, required: false },
|
|
204
|
+
appendAriaLabel: { type: String, required: false },
|
|
205
205
|
fontSize: { type: null, required: false },
|
|
206
206
|
fontWeight: { type: null, required: false },
|
|
207
207
|
lineHeight: { type: null, required: false },
|
|
@@ -241,8 +241,8 @@ const {
|
|
|
241
241
|
onClickAppend: handleClickAppend,
|
|
242
242
|
onKeydownPrepend: handleKeydownPrepend,
|
|
243
243
|
onKeydownAppend: handleKeydownAppend,
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
prependCommandAttrs,
|
|
245
|
+
appendCommandAttrs,
|
|
246
246
|
hasAppend,
|
|
247
247
|
hasPrepend
|
|
248
248
|
} = useAdjacent(props, prependIcon, appendIcon);
|
|
@@ -56,6 +56,7 @@ import { useStateFlag } from "../../composables/Commons/stateFlag.composable";
|
|
|
56
56
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
57
57
|
import { useTypography } from "../../composables/Commons/typography.composable";
|
|
58
58
|
import { isEmpty } from "../../utils/Commons/commons.util";
|
|
59
|
+
import { isIntent, tokenStylesForIntent } from "../../utils/Commons/color.util";
|
|
59
60
|
import { computed, useSlots } from "vue";
|
|
60
61
|
const props = defineProps({
|
|
61
62
|
icon: { type: null, required: false },
|
|
@@ -116,7 +117,19 @@ defineSlots();
|
|
|
116
117
|
const { filterProps } = useProps(props);
|
|
117
118
|
const { classes: hoverClasses, isOn: isHover, config: hoverState, unset: handleMouseleave, set: handleMouseenter } = useStateFlag(props, { state: "hover" });
|
|
118
119
|
const { classes: activeClasses, isOn: isActive, config: activeState, toggle: handleClick } = useStateFlag(props, { state: "active" });
|
|
119
|
-
const { colorClasses, colorStyles, borderClasses, borderStyles, roundedClasses, roundedStyles, elevationClasses, elevationStyles, paddingClasses, paddingStyles, marginClasses, marginStyles } = useStateEffect(props, isHover, isActive, hoverState, activeState);
|
|
120
|
+
const { color: effectiveColor, bgColor: effectiveBgColor, colorClasses, colorStyles, borderClasses, borderStyles, roundedClasses, roundedStyles, elevationClasses, elevationStyles, paddingClasses, paddingStyles, marginClasses, marginStyles } = useStateEffect(props, isHover, isActive, hoverState, activeState);
|
|
121
|
+
const avatarColorStyles = computed(() => {
|
|
122
|
+
const bg = effectiveBgColor.value;
|
|
123
|
+
const fg = effectiveColor.value;
|
|
124
|
+
if (!bg || bg === "ghost" || !isIntent(bg) || fg != null && isIntent(fg)) {
|
|
125
|
+
return colorStyles.value;
|
|
126
|
+
}
|
|
127
|
+
const intentFg = tokenStylesForIntent(bg, "default").color;
|
|
128
|
+
return [
|
|
129
|
+
...colorStyles.value.filter((decl) => !decl.startsWith("color:")),
|
|
130
|
+
`color: ${intentFg}`
|
|
131
|
+
];
|
|
132
|
+
});
|
|
120
133
|
const { typographyStyles } = useTypography(props, "avatar");
|
|
121
134
|
const slots = useSlots();
|
|
122
135
|
const hasImage = computed(() => {
|
|
@@ -149,7 +162,7 @@ const avatarStyles = computed(() => {
|
|
|
149
162
|
paddingStyles.value,
|
|
150
163
|
marginStyles.value,
|
|
151
164
|
sizeStyles.value,
|
|
152
|
-
|
|
165
|
+
avatarColorStyles.value,
|
|
153
166
|
elevationStyles.value,
|
|
154
167
|
typographyStyles.value,
|
|
155
168
|
props.style
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
<span
|
|
30
30
|
key="prepend"
|
|
31
31
|
class="origam-badge__prepend"
|
|
32
|
-
|
|
33
|
-
:tabindex="isPrependClickable ? 0 : undefined"
|
|
32
|
+
v-bind="prependCommandAttrs"
|
|
34
33
|
@click="handleClickPrepend"
|
|
35
34
|
@keydown="handleKeydownPrepend"
|
|
36
35
|
>
|
|
@@ -63,8 +62,7 @@
|
|
|
63
62
|
<span
|
|
64
63
|
key="append"
|
|
65
64
|
class="origam-badge__append"
|
|
66
|
-
|
|
67
|
-
:tabindex="isAppendClickable ? 0 : undefined"
|
|
65
|
+
v-bind="appendCommandAttrs"
|
|
68
66
|
@click="handleClickAppend"
|
|
69
67
|
@keydown="handleKeydownAppend"
|
|
70
68
|
>
|
|
@@ -154,7 +152,9 @@ const props = defineProps({
|
|
|
154
152
|
appendAvatar: { type: String, required: false },
|
|
155
153
|
appendIcon: { type: null, required: false },
|
|
156
154
|
prependAvatar: { type: String, required: false },
|
|
157
|
-
prependIcon: { type: null, required: false }
|
|
155
|
+
prependIcon: { type: null, required: false },
|
|
156
|
+
prependAriaLabel: { type: String, required: false },
|
|
157
|
+
appendAriaLabel: { type: String, required: false }
|
|
158
158
|
});
|
|
159
159
|
defineEmits(["click:append", "click:prepend", "update:hover"]);
|
|
160
160
|
defineSlots();
|
|
@@ -171,8 +171,8 @@ const {
|
|
|
171
171
|
onClickAppend: handleClickAppend,
|
|
172
172
|
onKeydownPrepend: handleKeydownPrepend,
|
|
173
173
|
onKeydownAppend: handleKeydownAppend,
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
prependCommandAttrs,
|
|
175
|
+
appendCommandAttrs,
|
|
176
176
|
hasAppend,
|
|
177
177
|
hasPrepend
|
|
178
178
|
} = useAdjacent(props, prependIcon, appendIcon);
|
|
@@ -15,8 +15,7 @@
|
|
|
15
15
|
<span
|
|
16
16
|
key="prepend"
|
|
17
17
|
class="origam-breadcrumb-item__prepend"
|
|
18
|
-
|
|
19
|
-
:tabindex="isPrependZoneFocusable ? 0 : undefined"
|
|
18
|
+
v-bind="prependCommandAttrs"
|
|
20
19
|
@click="handleClickPrepend"
|
|
21
20
|
@keydown="handleKeydownPrepend"
|
|
22
21
|
>
|
|
@@ -45,8 +44,7 @@
|
|
|
45
44
|
<span
|
|
46
45
|
key="append"
|
|
47
46
|
class="origam-breadcrumb-item__append"
|
|
48
|
-
|
|
49
|
-
:tabindex="isAppendZoneFocusable ? 0 : undefined"
|
|
47
|
+
v-bind="appendCommandAttrs"
|
|
50
48
|
@click="handleClickAppend"
|
|
51
49
|
@keydown="handleKeydownAppend"
|
|
52
50
|
>
|
|
@@ -73,6 +71,7 @@
|
|
|
73
71
|
import OrigamAvatar from "../Avatar/OrigamAvatar.vue";
|
|
74
72
|
import OrigamIcon from "../Icon/OrigamIcon.vue";
|
|
75
73
|
import vContrast from "../../directives/Contrast/contrast.directive";
|
|
74
|
+
import { useAccessibleCommand } from "../../composables/Commons/accessibleCommand.composable";
|
|
76
75
|
import { useAdjacent } from "../../composables/Commons/adjacent.composable";
|
|
77
76
|
import { useDensity } from "../../composables/Commons/density.composable";
|
|
78
77
|
import { useLink } from "../../composables/Commons/link.composable";
|
|
@@ -132,6 +131,8 @@ const props = defineProps({
|
|
|
132
131
|
appendIcon: { type: null, required: false },
|
|
133
132
|
prependAvatar: { type: String, required: false },
|
|
134
133
|
prependIcon: { type: null, required: false },
|
|
134
|
+
prependAriaLabel: { type: String, required: false },
|
|
135
|
+
appendAriaLabel: { type: String, required: false },
|
|
135
136
|
hover: { type: [Boolean, Object], required: false },
|
|
136
137
|
hoverClass: { type: String, required: false },
|
|
137
138
|
active: { type: [Boolean, Object], required: false },
|
|
@@ -160,6 +161,20 @@ const {
|
|
|
160
161
|
} = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|
|
161
162
|
const isPrependZoneFocusable = computed(() => isPrependClickable.value && !link.isLink?.value);
|
|
162
163
|
const isAppendZoneFocusable = computed(() => isAppendClickable.value && !link.isLink?.value);
|
|
164
|
+
const prependCommandAttrs = useAccessibleCommand({
|
|
165
|
+
component: "OrigamBreadcrumbItem",
|
|
166
|
+
zone: "prepend",
|
|
167
|
+
prop: "prependAriaLabel",
|
|
168
|
+
active: isPrependZoneFocusable,
|
|
169
|
+
label: () => props.prependAriaLabel
|
|
170
|
+
});
|
|
171
|
+
const appendCommandAttrs = useAccessibleCommand({
|
|
172
|
+
component: "OrigamBreadcrumbItem",
|
|
173
|
+
zone: "append",
|
|
174
|
+
prop: "appendAriaLabel",
|
|
175
|
+
active: isAppendZoneFocusable,
|
|
176
|
+
label: () => props.appendAriaLabel
|
|
177
|
+
});
|
|
163
178
|
const { densityClasses } = useDensity(props);
|
|
164
179
|
const breadcrumbItemStyles = computed(() => {
|
|
165
180
|
return [
|
|
@@ -252,6 +267,10 @@ defineExpose({
|
|
|
252
267
|
pointer-events: none;
|
|
253
268
|
}
|
|
254
269
|
|
|
270
|
+
&[aria-current='page'] {
|
|
271
|
+
--origam-breadcrumb-item---opacity: var(--origam-opacity---100);
|
|
272
|
+
}
|
|
273
|
+
|
|
255
274
|
&--density-comfortable {
|
|
256
275
|
--origam-breadcrumb-item---density: -8px;
|
|
257
276
|
}
|
|
@@ -62,7 +62,6 @@
|
|
|
62
62
|
v-if="hasPrepend"
|
|
63
63
|
key="prepend"
|
|
64
64
|
class="origam-btn__prepend"
|
|
65
|
-
@click="handleClickPrepend"
|
|
66
65
|
>
|
|
67
66
|
<slot name="prepend">
|
|
68
67
|
<origam-avatar
|
|
@@ -101,7 +100,6 @@
|
|
|
101
100
|
v-if="hasAppend"
|
|
102
101
|
key="append"
|
|
103
102
|
class="origam-btn__append"
|
|
104
|
-
@click="handleClickAppend"
|
|
105
103
|
>
|
|
106
104
|
<slot name="append">
|
|
107
105
|
<origam-avatar
|
|
@@ -125,7 +123,7 @@
|
|
|
125
123
|
</template>
|
|
126
124
|
|
|
127
125
|
<script lang="ts" setup>
|
|
128
|
-
import { computed,
|
|
126
|
+
import { computed, ref, StyleValue, toRef, useAttrs, useSlots, watchEffect } from "vue";
|
|
129
127
|
import OrigamAvatar from "../Avatar/OrigamAvatar.vue";
|
|
130
128
|
import OrigamIcon from "../Icon/OrigamIcon.vue";
|
|
131
129
|
import OrigamLoader from "../Loader/OrigamLoader.vue";
|
|
@@ -148,8 +146,7 @@ import { useStatus } from "../../composables/Commons/status.composable";
|
|
|
148
146
|
import { useStyle } from "../../composables/Commons/style.composable";
|
|
149
147
|
import { useTypography } from "../../composables/Commons/typography.composable";
|
|
150
148
|
import { useVariant } from "../../composables/Commons/variant.composable";
|
|
151
|
-
import {
|
|
152
|
-
import { ADJACENT_EMIT_REPLACEMENT } from "../../consts/Btn/btn.const";
|
|
149
|
+
import { warnMissingNativeControlName } from "../../utils/Commons/a11y.util";
|
|
153
150
|
import { ORIGAM_BTN_TOGGLE_KEY } from "../../consts/Btn/btn-toggle.const";
|
|
154
151
|
import vContrast from "../../directives/Contrast/contrast.directive";
|
|
155
152
|
import vRipple from "../../directives/Ripple/ripple.directive";
|
|
@@ -234,6 +231,8 @@ const props = defineProps({
|
|
|
234
231
|
appendIcon: { type: null, required: false },
|
|
235
232
|
prependAvatar: { type: String, required: false },
|
|
236
233
|
prependIcon: { type: null, required: false },
|
|
234
|
+
prependAriaLabel: { type: String, required: false },
|
|
235
|
+
appendAriaLabel: { type: String, required: false },
|
|
237
236
|
hover: { type: [Boolean, Object], required: false },
|
|
238
237
|
hoverClass: { type: String, required: false },
|
|
239
238
|
active: { type: [Boolean, Object], required: false, default: void 0 },
|
|
@@ -245,7 +244,7 @@ const props = defineProps({
|
|
|
245
244
|
letterSpacing: { type: null, required: false }
|
|
246
245
|
});
|
|
247
246
|
const colorLocked = computed(() => props.color ? "true" : void 0);
|
|
248
|
-
defineEmits(["
|
|
247
|
+
defineEmits(["group:selected"]);
|
|
249
248
|
defineSlots();
|
|
250
249
|
const { filterProps } = useProps(props);
|
|
251
250
|
const origamProgressRef = ref();
|
|
@@ -309,17 +308,9 @@ const {
|
|
|
309
308
|
} = useStateEffect(props, isHover, isActive, hoverState, activeState, isDisabled, toRef(props, "flat"));
|
|
310
309
|
const { variantClasses } = useVariant(props);
|
|
311
310
|
const {
|
|
312
|
-
onClickPrepend: handleClickPrepend,
|
|
313
|
-
onClickAppend: handleClickAppend,
|
|
314
|
-
isPrependClickable,
|
|
315
|
-
isAppendClickable,
|
|
316
311
|
hasAppend,
|
|
317
312
|
hasPrepend
|
|
318
313
|
} = useAdjacent(props, prependIcon, appendIcon);
|
|
319
|
-
onMounted(() => {
|
|
320
|
-
if (isPrependClickable.value) warnDeprecatedEmit("OrigamBtn", "click:prepend", ADJACENT_EMIT_REPLACEMENT);
|
|
321
|
-
if (isAppendClickable.value) warnDeprecatedEmit("OrigamBtn", "click:append", ADJACENT_EMIT_REPLACEMENT);
|
|
322
|
-
});
|
|
323
314
|
const handleClick = (e) => {
|
|
324
315
|
if (isDisabled.value || link.isLink.value && (e.metaKey || e.ctrlKey || e.shiftKey || e.button !== 0 || attrs.target === "_blank")) return;
|
|
325
316
|
link.navigate?.(e);
|
|
@@ -331,6 +322,21 @@ const hasIcon = computed(() => {
|
|
|
331
322
|
const hasLoader = computed(() => {
|
|
332
323
|
return slots.loader || loaderConfig.value.isActive;
|
|
333
324
|
});
|
|
325
|
+
const isUnnamedIconOnly = computed(() => {
|
|
326
|
+
if (!hasIcon.value) return false;
|
|
327
|
+
if (slots.default || props.text) return false;
|
|
328
|
+
return !(attrs["aria-label"] || attrs["aria-labelledby"] || attrs.title);
|
|
329
|
+
});
|
|
330
|
+
if (import.meta.env?.DEV) {
|
|
331
|
+
watchEffect(() => {
|
|
332
|
+
if (isUnnamedIconOnly.value) {
|
|
333
|
+
warnMissingNativeControlName(
|
|
334
|
+
"OrigamBtn",
|
|
335
|
+
"icon-only mode renders a <button> whose only content is an aria-hidden glyph"
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
334
340
|
const isSkeletonLoading = computed(() => {
|
|
335
341
|
return loaderConfig.value.isActive && loaderConfig.value.kind === "skeleton";
|
|
336
342
|
});
|
|
@@ -1136,7 +1142,7 @@ defineExpose({
|
|
|
1136
1142
|
--origam-btn__prepend---margin-inline-start: calc(var(--origam-btn---height) / -9);
|
|
1137
1143
|
--origam-btn__prepend---margin-inline-end: calc(var(--origam-btn---height) / 4.5);
|
|
1138
1144
|
|
|
1139
|
-
--origam-btn---min-width: calc(var(--origam-btn---width, 36px) + var(--origam-btn---density,
|
|
1140
|
-
--origam-btn---min-height: calc(var(--origam-btn---height, 36px) + var(--origam-btn---density,
|
|
1145
|
+
--origam-btn---min-width: calc(var(--origam-btn---width, 36px) + var(--origam-btn---density, 0px));
|
|
1146
|
+
--origam-btn---min-height: calc(var(--origam-btn---height, 36px) + var(--origam-btn---density, 0px));
|
|
1141
1147
|
}
|
|
1142
1148
|
</style>
|
|
@@ -442,7 +442,7 @@ defineExpose({
|
|
|
442
442
|
|
|
443
443
|
<style>
|
|
444
444
|
:root {
|
|
445
|
-
--origam-btn-group---density:
|
|
445
|
+
--origam-btn-group---density: 0px;
|
|
446
446
|
|
|
447
447
|
--origam-btn-group---border-radius: var(--origam-btn---border-radius, 4px);
|
|
448
448
|
--origam-btn-group---border-width: var(--origam-btn---border-width, 0);
|
|
@@ -246,6 +246,8 @@ const props = defineProps({
|
|
|
246
246
|
appendIcon: { type: null, required: false },
|
|
247
247
|
prependAvatar: { type: String, required: false },
|
|
248
248
|
prependIcon: { type: null, required: false },
|
|
249
|
+
prependAriaLabel: { type: String, required: false },
|
|
250
|
+
appendAriaLabel: { type: String, required: false },
|
|
249
251
|
active: { type: [Boolean, Object], required: false },
|
|
250
252
|
activeClass: { type: String, required: false }
|
|
251
253
|
});
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
v-if="hasPrepend"
|
|
17
17
|
key="prepend"
|
|
18
18
|
class="origam-card-header__prepend"
|
|
19
|
-
|
|
20
|
-
:tabindex="isPrependClickable ? 0 : undefined"
|
|
19
|
+
v-bind="prependCommandAttrs"
|
|
21
20
|
@click="handleClickPrepend"
|
|
22
21
|
@keydown="handleKeydownPrepend"
|
|
23
22
|
>
|
|
@@ -75,8 +74,7 @@
|
|
|
75
74
|
v-if="hasAppend"
|
|
76
75
|
key="append"
|
|
77
76
|
class="origam-card-header__append"
|
|
78
|
-
|
|
79
|
-
:tabindex="isAppendClickable ? 0 : undefined"
|
|
77
|
+
v-bind="appendCommandAttrs"
|
|
80
78
|
@click="handleClickAppend"
|
|
81
79
|
@keydown="handleKeydownAppend"
|
|
82
80
|
>
|
|
@@ -157,6 +155,8 @@ const props = defineProps({
|
|
|
157
155
|
appendIcon: { type: null, required: false },
|
|
158
156
|
prependAvatar: { type: String, required: false },
|
|
159
157
|
prependIcon: { type: null, required: false },
|
|
158
|
+
prependAriaLabel: { type: String, required: false },
|
|
159
|
+
appendAriaLabel: { type: String, required: false },
|
|
160
160
|
fontSize: { type: null, required: false },
|
|
161
161
|
fontWeight: { type: null, required: false },
|
|
162
162
|
lineHeight: { type: null, required: false },
|
|
@@ -178,8 +178,8 @@ const {
|
|
|
178
178
|
onClickAppend: handleClickAppend,
|
|
179
179
|
onKeydownPrepend: handleKeydownPrepend,
|
|
180
180
|
onKeydownAppend: handleKeydownAppend,
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
prependCommandAttrs,
|
|
182
|
+
appendCommandAttrs,
|
|
183
183
|
hasPrepend,
|
|
184
184
|
hasAppend
|
|
185
185
|
} = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
|
|
@@ -479,7 +479,7 @@ defineExpose({
|
|
|
479
479
|
--origam-card-header__title---line-height: 1.5rem;
|
|
480
480
|
--origam-card-header__title---text-transform: none;
|
|
481
481
|
|
|
482
|
-
--origam-card-header__subtitle---color:
|
|
482
|
+
--origam-card-header__subtitle---color: currentColor;
|
|
483
483
|
--origam-card-header__subtitle---display: -webkit-box;
|
|
484
484
|
--origam-card-header__subtitle---overflow: hidden;
|
|
485
485
|
|
|
@@ -194,6 +194,8 @@ const { t } = useLocale();
|
|
|
194
194
|
const model = useVModel(props, "modelValue");
|
|
195
195
|
const origamWindowRef = ref();
|
|
196
196
|
let slideTimeout = -1;
|
|
197
|
+
let restartFrame = -1;
|
|
198
|
+
let disposed = false;
|
|
197
199
|
const progressPercent = ref(0);
|
|
198
200
|
let progressRaf = -1;
|
|
199
201
|
let progressStart = 0;
|
|
@@ -253,7 +255,13 @@ const playPauseIcon = computed(() => {
|
|
|
253
255
|
});
|
|
254
256
|
const restartTimeout = () => {
|
|
255
257
|
window.clearTimeout(slideTimeout);
|
|
256
|
-
|
|
258
|
+
if (disposed) return;
|
|
259
|
+
window.cancelAnimationFrame(restartFrame);
|
|
260
|
+
restartFrame = window.requestAnimationFrame(() => {
|
|
261
|
+
restartFrame = -1;
|
|
262
|
+
if (disposed) return;
|
|
263
|
+
startTimeout();
|
|
264
|
+
});
|
|
257
265
|
};
|
|
258
266
|
watch(model, restartTimeout);
|
|
259
267
|
watch(() => props.interval, restartTimeout);
|
|
@@ -271,6 +279,11 @@ watch(() => props.progress, (val) => {
|
|
|
271
279
|
});
|
|
272
280
|
onMounted(startTimeout);
|
|
273
281
|
onBeforeUnmount(() => {
|
|
282
|
+
disposed = true;
|
|
283
|
+
if (restartFrame !== -1) {
|
|
284
|
+
window.cancelAnimationFrame(restartFrame);
|
|
285
|
+
restartFrame = -1;
|
|
286
|
+
}
|
|
274
287
|
window.clearTimeout(slideTimeout);
|
|
275
288
|
stopProgress();
|
|
276
289
|
});
|
|
@@ -589,7 +589,7 @@ const svgDesc = computed(() => {
|
|
|
589
589
|
});
|
|
590
590
|
const boxAriaLabel = (box) => {
|
|
591
591
|
const { min, q1, median, q3, max } = box.rawStats;
|
|
592
|
-
return
|
|
592
|
+
return t("origam.chart.box_plot.box_aria_label", box.category, min, q1, median, q3, max);
|
|
593
593
|
};
|
|
594
594
|
const onBoxEnter = (box) => {
|
|
595
595
|
hoveredIndex.value = box.index;
|
|
@@ -536,7 +536,8 @@ const rootClasses = computed(() => [
|
|
|
536
536
|
elevationClasses.value,
|
|
537
537
|
marginClasses.value,
|
|
538
538
|
paddingClasses.value,
|
|
539
|
-
roundedClasses.value
|
|
539
|
+
roundedClasses.value,
|
|
540
|
+
props.class
|
|
540
541
|
]);
|
|
541
542
|
const rootStyles = computed(() => {
|
|
542
543
|
const out = {};
|
|
@@ -562,7 +563,7 @@ const svgDesc = computed(() => {
|
|
|
562
563
|
});
|
|
563
564
|
const bulletAriaLabel = (bullet) => {
|
|
564
565
|
const pct = bullet.datum.target ? Math.round(bullet.datum.value / bullet.datum.target * 100) : 0;
|
|
565
|
-
return
|
|
566
|
+
return t("origam.chart.bullet.bullet_aria_label", bullet.category, bullet.datum.value, bullet.datum.target, pct);
|
|
566
567
|
};
|
|
567
568
|
const onBulletEnter = (bullet) => {
|
|
568
569
|
hoveredIndex.value = bullet.index;
|
|
@@ -475,8 +475,8 @@ const svgDesc = computed(() => {
|
|
|
475
475
|
});
|
|
476
476
|
const candleAriaLabel = (candle) => {
|
|
477
477
|
const d = candle.datum;
|
|
478
|
-
const direction = candle.isBullish ? "
|
|
479
|
-
return
|
|
478
|
+
const direction = candle.isBullish ? t("origam.chart.candlestick.direction_bullish") : t("origam.chart.candlestick.direction_bearish");
|
|
479
|
+
return t("origam.chart.candlestick.candle_aria_label", d.date, direction, d.open, d.high, d.low, d.close);
|
|
480
480
|
};
|
|
481
481
|
const onCandleEnter = (candle) => {
|
|
482
482
|
hoveredIndex.value = candle.index;
|