@riverty/web-components 6.0.0 → 6.2.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/CHANGELOG.md +44 -0
- package/custom-elements.json +259 -2
- package/dist/cjs/{index-DJ4H_bFj.js → index-BnETQtSf.js} +9 -382
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion.cjs.entry.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +9 -6
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +6 -2
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +1 -1
- package/dist/cjs/r-hint_2.cjs.entry.js +3 -3
- package/dist/cjs/r-icon-button_2.cjs.entry.js +27 -7
- package/dist/cjs/r-icon.cjs.entry.js +2 -2
- package/dist/cjs/r-illustration.cjs.entry.js +396 -0
- package/dist/cjs/r-input-code.cjs.entry.js +34 -12
- package/dist/cjs/r-input-date.cjs.entry.js +7 -7
- package/dist/cjs/r-input-password.cjs.entry.js +3 -3
- package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/r-input.cjs.entry.js +8 -5
- package/dist/cjs/r-list-item.cjs.entry.js +17 -16
- package/dist/cjs/r-pagination.cjs.entry.js +56 -50
- package/dist/cjs/r-panel.cjs.entry.js +6 -6
- package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-headline.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-trigger.cjs.entry.js +2 -2
- package/dist/cjs/r-popover.cjs.entry.js +46 -5
- package/dist/cjs/r-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-description.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-title.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button.cjs.entry.js +8 -7
- package/dist/cjs/r-radio-group.cjs.entry.js +83 -10
- package/dist/cjs/r-select-option.cjs.entry.js +2 -2
- package/dist/cjs/r-select.cjs.entry.js +6 -4
- package/dist/cjs/r-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper-item.cjs.entry.js +19 -4
- package/dist/cjs/r-stepper.cjs.entry.js +76 -3
- package/dist/cjs/r-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-tab.cjs.entry.js +7 -3
- package/dist/cjs/r-tabs-list.cjs.entry.js +161 -3
- package/dist/cjs/r-tabs.cjs.entry.js +35 -7
- package/dist/cjs/r-textarea.cjs.entry.js +2 -2
- package/dist/cjs/r-toast-group.cjs.entry.js +13 -4
- package/dist/cjs/r-toast.cjs.entry.js +104 -15
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert/alert.css +6 -6
- package/dist/collection/components/alert/alert.js +7 -4
- package/dist/collection/components/button/button.js +30 -1
- package/dist/collection/components/button/exports.js +1 -0
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/icon/exports.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/riverty-kit.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +22 -3
- package/dist/collection/components/illustration/data.js +112 -0
- package/dist/collection/components/illustration/exports.js +3 -0
- package/dist/collection/components/illustration/illustration.js +540 -0
- package/dist/collection/components/illustration/illustration.scss +56 -0
- package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
- package/dist/collection/components/input/exports.js +3 -0
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +100 -3
- package/dist/collection/components/input-code/exports.js +2 -2
- package/dist/collection/components/input-code/input-code.css +6 -0
- package/dist/collection/components/input-code/input-code.js +54 -16
- package/dist/collection/components/input-date/input-date.js +6 -6
- package/dist/collection/components/input-password/input-password.js +2 -2
- package/dist/collection/components/input-phone-number/input-phone-number.js +3 -3
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/list-item/list-item/list-item.css +46 -12
- package/dist/collection/components/list-item/list-item/list-item.js +34 -14
- package/dist/collection/components/pagination/pagination.css +33 -72
- package/dist/collection/components/pagination/pagination.js +194 -48
- package/dist/collection/components/panel/panel.css +40 -17
- package/dist/collection/components/panel/panel.js +6 -6
- package/dist/collection/components/popover/popover.css +0 -1
- package/dist/collection/components/popover/popover.js +44 -3
- package/dist/collection/components/popover-action/popover-action.js +1 -1
- package/dist/collection/components/popover-content/popover-content.js +1 -1
- package/dist/collection/components/popover-headline/popover-headline.js +1 -1
- package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +7 -6
- package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
- package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
- package/dist/collection/components/radio-group/radio-group.css +4 -1
- package/dist/collection/components/radio-group/radio-group.js +100 -8
- package/dist/collection/components/select/select.js +5 -3
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/skip-link/skip-link.js +1 -1
- package/dist/collection/components/stepper/stepper.css +5 -2
- package/dist/collection/components/stepper/stepper.js +125 -1
- package/dist/collection/components/stepper-item/stepper-item.css +25 -12
- package/dist/collection/components/stepper-item/stepper-item.js +36 -2
- package/dist/collection/components/tab/tab.css +29 -29
- package/dist/collection/components/tab/tab.js +5 -1
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +34 -6
- package/dist/collection/components/tabs-list/exports.js +2 -0
- package/dist/collection/components/tabs-list/tabs-list.css +43 -2
- package/dist/collection/components/tabs-list/tabs-list.js +277 -1
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/toast/toast.css +37 -11
- package/dist/collection/components/toast/toast.js +140 -18
- package/dist/collection/components/toast-group/toast-group.css +5 -11
- package/dist/collection/components/toast-group/toast-group.js +12 -3
- package/dist/collection/components/tooltip/tooltip.js +24 -4
- package/dist/esm/{index-Da7qOBFr.js → index-CTxpqopm.js} +9 -382
- package/dist/esm/loader.js +3 -3
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +1 -1
- package/dist/esm/r-accordion.entry.js +1 -1
- package/dist/esm/r-alert.entry.js +9 -6
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +6 -2
- package/dist/esm/r-checkbox-group.entry.js +1 -1
- package/dist/esm/r-checkbox.entry.js +4 -4
- package/dist/esm/r-design-system-devtools.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +1 -1
- package/dist/esm/r-hint_2.entry.js +3 -3
- package/dist/esm/r-icon-button_2.entry.js +27 -7
- package/dist/esm/r-icon.entry.js +2 -2
- package/dist/esm/r-illustration.entry.js +394 -0
- package/dist/esm/r-input-code.entry.js +34 -12
- package/dist/esm/r-input-date.entry.js +7 -7
- package/dist/esm/r-input-password.entry.js +3 -3
- package/dist/esm/r-input-phone-number.entry.js +4 -4
- package/dist/esm/r-input.entry.js +8 -5
- package/dist/esm/r-list-item.entry.js +17 -16
- package/dist/esm/r-pagination.entry.js +56 -50
- package/dist/esm/r-panel.entry.js +6 -6
- package/dist/esm/r-popover-action.entry.js +2 -2
- package/dist/esm/r-popover-content.entry.js +2 -2
- package/dist/esm/r-popover-headline.entry.js +2 -2
- package/dist/esm/r-popover-trigger.entry.js +2 -2
- package/dist/esm/r-popover.entry.js +46 -5
- package/dist/esm/r-progress-bar.entry.js +2 -2
- package/dist/esm/r-radio-button-description.entry.js +2 -2
- package/dist/esm/r-radio-button-leading.entry.js +2 -2
- package/dist/esm/r-radio-button-title.entry.js +2 -2
- package/dist/esm/r-radio-button-trailing.entry.js +2 -2
- package/dist/esm/r-radio-button.entry.js +8 -7
- package/dist/esm/r-radio-group.entry.js +83 -10
- package/dist/esm/r-select-option.entry.js +2 -2
- package/dist/esm/r-select.entry.js +6 -4
- package/dist/esm/r-skip-link.entry.js +2 -2
- package/dist/esm/r-stepper-item.entry.js +19 -4
- package/dist/esm/r-stepper.entry.js +76 -3
- package/dist/esm/r-tab-panel.entry.js +2 -2
- package/dist/esm/r-tab.entry.js +7 -3
- package/dist/esm/r-tabs-list.entry.js +161 -3
- package/dist/esm/r-tabs.entry.js +35 -7
- package/dist/esm/r-textarea.entry.js +2 -2
- package/dist/esm/r-toast-group.entry.js +13 -4
- package/dist/esm/r-toast.entry.js +104 -15
- package/dist/esm/web-components.js +3 -3
- package/dist/types/components/alert/alert.d.ts +1 -0
- package/dist/types/components/button/button.d.ts +8 -1
- package/dist/types/components/button/exports.d.ts +2 -0
- package/dist/types/components/icon/{icon-data.d.ts → data.d.ts} +2 -1
- package/dist/types/components/icon/exports.d.ts +2 -1
- package/dist/types/components/icon/riverty-kit.d.ts +2 -1
- package/dist/types/components/icon-button/icon-button.d.ts +4 -0
- package/dist/types/components/illustration/data.d.ts +52 -0
- package/dist/types/components/illustration/exports.d.ts +23 -0
- package/dist/types/components/illustration/illustration.d.ts +51 -0
- package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
- package/dist/types/components/input/exports.d.ts +6 -0
- package/dist/types/components/input/input.d.ts +31 -1
- package/dist/types/components/input-code/exports.d.ts +4 -4
- package/dist/types/components/input-code/input-code.d.ts +18 -4
- package/dist/types/components/list-item/list-item/list-item.d.ts +5 -3
- package/dist/types/components/pagination/pagination.d.ts +19 -0
- package/dist/types/components/popover/popover.d.ts +9 -0
- package/dist/types/components/radio-group/radio-group.d.ts +16 -0
- package/dist/types/components/stepper/stepper.d.ts +11 -0
- package/dist/types/components/stepper-item/stepper-item.d.ts +7 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -0
- package/dist/types/components/tabs-list/exports.d.ts +4 -0
- package/dist/types/components/tabs-list/tabs-list.d.ts +38 -0
- package/dist/types/components/toast/toast.d.ts +20 -3
- package/dist/types/components/tooltip/tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +360 -17
- package/dist/web-components/p-02b22f8e.entry.js +1 -0
- package/dist/web-components/{p-d054eb4d.entry.js → p-075a8dc8.entry.js} +1 -1
- package/dist/web-components/{p-8a66d20c.entry.js → p-0a34d33b.entry.js} +1 -1
- package/dist/web-components/{p-8c31cbd5.entry.js → p-10cc9983.entry.js} +1 -1
- package/dist/web-components/{p-d7726e46.entry.js → p-253068b9.entry.js} +1 -1
- package/dist/web-components/{p-3884c6e7.entry.js → p-3b8c8951.entry.js} +1 -1
- package/dist/web-components/{p-550e2237.entry.js → p-3beacdab.entry.js} +1 -1
- package/dist/web-components/{p-e2188953.entry.js → p-4214867d.entry.js} +1 -1
- package/dist/web-components/{p-3f60c6c0.entry.js → p-42c857e9.entry.js} +1 -1
- package/dist/web-components/{p-7fed6f4d.entry.js → p-44f87e16.entry.js} +1 -1
- package/dist/web-components/p-477614c5.entry.js +1 -0
- package/dist/web-components/{p-1da75540.entry.js → p-495ba3d2.entry.js} +1 -1
- package/dist/web-components/p-4de76291.entry.js +1 -0
- package/dist/web-components/{p-05738503.entry.js → p-55600d47.entry.js} +1 -1
- package/dist/web-components/p-562051aa.entry.js +1 -0
- package/dist/web-components/p-5b850e0f.entry.js +1 -0
- package/dist/web-components/p-6013dfc8.entry.js +1 -0
- package/dist/web-components/{p-6cc2ea2c.entry.js → p-62e7ae04.entry.js} +1 -1
- package/dist/web-components/p-71519d37.entry.js +1 -0
- package/dist/web-components/p-88f7b47f.entry.js +1 -0
- package/dist/web-components/p-8975a6a3.entry.js +1 -0
- package/dist/web-components/p-8e125826.entry.js +1 -0
- package/dist/web-components/p-91cc0bde.entry.js +1 -0
- package/dist/web-components/{p-0347feff.entry.js → p-93435fcd.entry.js} +1 -1
- package/dist/web-components/p-947969d7.entry.js +1 -0
- package/dist/web-components/p-95396b5c.entry.js +1 -0
- package/dist/web-components/p-9de3a1a5.entry.js +1 -0
- package/dist/web-components/p-9f583ed1.entry.js +1 -0
- package/dist/web-components/p-CTxpqopm.js +2 -0
- package/dist/web-components/{p-e5945c01.entry.js → p-a1086abe.entry.js} +1 -1
- package/dist/web-components/{p-f9d5004c.entry.js → p-bbba6d79.entry.js} +1 -1
- package/dist/web-components/{p-c478712b.entry.js → p-bde44ec4.entry.js} +1 -1
- package/dist/web-components/p-bfc7e6c0.entry.js +1 -0
- package/dist/web-components/p-c1030394.entry.js +1 -0
- package/dist/web-components/p-c1f59ed1.entry.js +1 -0
- package/dist/web-components/{p-26ef77d6.entry.js → p-c80a5541.entry.js} +1 -1
- package/dist/web-components/{p-9ef1bbee.entry.js → p-c96ee61a.entry.js} +1 -1
- package/dist/web-components/{p-8dac326b.entry.js → p-caf8f067.entry.js} +1 -1
- package/dist/web-components/p-cc363c3d.entry.js +1 -0
- package/dist/web-components/p-cf4ff357.entry.js +1 -0
- package/dist/web-components/p-d0310ed4.entry.js +1 -0
- package/dist/web-components/p-d1412932.entry.js +1 -0
- package/dist/web-components/{p-62b788bf.entry.js → p-d2447e30.entry.js} +1 -1
- package/dist/web-components/p-dc9cca06.entry.js +1 -0
- package/dist/web-components/p-e5b943a2.entry.js +1 -0
- package/dist/web-components/{p-4cc58c6a.entry.js → p-e67b13df.entry.js} +1 -1
- package/dist/web-components/p-efec231a.entry.js +1 -0
- package/dist/web-components/{p-4595fa8e.entry.js → p-f867e4c3.entry.js} +1 -1
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +5 -2
- package/dist/collection/components/icon/bundled-icons/all-kit.json +0 -1
- package/dist/collection/components/icon/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/bundled-icons/all-kit.json +0 -1
- package/dist/web-components/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/p-0e4c8bf1.entry.js +0 -1
- package/dist/web-components/p-3a5a67e7.entry.js +0 -1
- package/dist/web-components/p-4254a383.entry.js +0 -1
- package/dist/web-components/p-5441b746.entry.js +0 -1
- package/dist/web-components/p-589baaf9.entry.js +0 -1
- package/dist/web-components/p-60341de2.entry.js +0 -1
- package/dist/web-components/p-60ca994e.entry.js +0 -1
- package/dist/web-components/p-6303b9fe.entry.js +0 -1
- package/dist/web-components/p-63fd817d.entry.js +0 -1
- package/dist/web-components/p-673dbfd0.entry.js +0 -1
- package/dist/web-components/p-67fa3f84.entry.js +0 -1
- package/dist/web-components/p-6a4f3836.entry.js +0 -1
- package/dist/web-components/p-70784685.entry.js +0 -1
- package/dist/web-components/p-8b4d2448.entry.js +0 -1
- package/dist/web-components/p-Da7qOBFr.js +0 -2
- package/dist/web-components/p-a0dbde7c.entry.js +0 -1
- package/dist/web-components/p-a71485d8.entry.js +0 -1
- package/dist/web-components/p-a7d22c76.entry.js +0 -1
- package/dist/web-components/p-ae251d2f.entry.js +0 -1
- package/dist/web-components/p-b98ab649.entry.js +0 -1
- package/dist/web-components/p-b9e3b3d6.entry.js +0 -1
- package/dist/web-components/p-c1e748f2.entry.js +0 -1
- package/dist/web-components/p-d433a828.entry.js +0 -1
- package/dist/web-components/p-d819c8e5.entry.js +0 -1
- package/dist/web-components/p-f7adb875.entry.js +0 -1
- /package/dist/collection/components/icon/{icon-data.js → data.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
3
|
const radioButtonCss = ":host{display:inline-flex;outline:none;position:relative;pointer-events:auto;border:0.0625rem solid transparent;cursor:pointer;min-width:17.5rem}:host slot{display:contents}:host(:hover:not([disabled]:not([disabled=false])):not([checked]:not([checked=false]))){--r-radio-button--cursor:pointer;--r-radio-button--box--background-color:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false])):not([checked]:not([checked=false]))){--r-radio-button--box--border-color:var(--r-border-regular, #282828);--r-radio-button--box--background-color:var(--r-background-interactive-pressed, rgba(40, 40, 40, 0.12))}:host(:focus-within),:host(.focused){--r-radio-button--box--box-shadow:0 0 0 4px var(--r-border-focused-outlined, #fff);--r-radio-button--box--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--box--outline-offset:1px}:host([checked]:not([checked=false])),:host([checked]:not([checked=false]):hover){cursor:default;--r-radio-button--box--border-color:var(--r-border-regular, #282828);--r-radio-button--box--background-color:var(--r-background-interactive-softest, #fff);--r-radio-button--marker--transform:scale(1)}:host([invalid]:not([invalid=false])),:host([invalid]:not([invalid=false])[checked]:not([checked=false])){--r-radio-button--box--border-color:var(--r-status-error-regular, #b00c15);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6)}:host([disabled]:not([disabled=false])){--r-radio-button--box--opacity:0.4;cursor:not-allowed}.r-radio-button{display:var(--r-radio-button--display, flex);flex:var(--r-radio-button--flex, 1);gap:var(--r-radio-button--gap, var(--r-spacing-075, 0.75rem));position:var(--r-radio-button--position, relative);min-height:var(--r-radio-button--min-height, 24px);user-select:var(--r-radio-button--user-select, none);box-sizing:var(--r-radio-button--box-sizing, border-box);font-family:var(--r-radio-button--font-family, var(--r-font-family-text, system-ui));font-size:var(--r-radio-button--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-radio-button--line-height, var(--r-line-height-m, 1.5rem));text-align:var(--r-radio-button--text-align, left);color:var(--r-radio-button--color, var(--r-text-regular, #282828));opacity:var(--r-radio-button--opacity, 1);box-shadow:var(--r-radio-button--box-shadow, none);outline:var(--r-radio-button--outline, none);cursor:var(--r-radio-button--cursor, inherit);padding:var(--r-radio-button--padding, var(--r-spacing-100, 1rem));margin:var(--r-radio-button--margin, 0);background-color:var(--r-radio-button--background-color, transparent);border-color:var(--r-radio-button--border-color, transparent);border-width:var(--r-radio-button--border-width, 0);border-style:var(--r-radio-button--border-style, solid)}.r-radio-button--input{position:var(--r-radio-button--input--position, absolute);z-index:var(--r-radio-button--input--z-index, -1);opacity:var(--r-radio-button--input--opacity, 0)}.r-radio-button--box{position:var(--r-radio-button--box--position, relative);display:var(--r-radio-button--box--display, block);top:var(--r-radio-button--box--top, 0);left:var(--r-radio-button--box--left, 0);width:var(--r-radio-button--box--width, 1.5rem);height:var(--r-radio-button--box--height, 1.5rem);background-color:var(--r-radio-button--box--background-color, var(--r-background-interactive-softest, #fff));border-width:var(--r-radio-button--box--border-width, 0.0625rem);border-style:var(--r-radio-button--box--border-style, solid);border-color:var(--r-radio-button--box--border-color, var(--r-border-soft, #686868));border-radius:var(--r-radio-button--box--border-radius, 50%);box-sizing:var(--r-radio-button--box--box-sizing, border-box);box-shadow:var(--r-radio-button--box--box-shadow, none);outline:var(--r-radio-button--box--outline, none);outline-offset:var(--r-radio-button--box--outline-offset, 0);cursor:var(--r-radio-button--box--cursor, inherit);opacity:var(--r-radio-button--box--opacity, 1)}.r-radio-button--box::before{content:var(--r-radio-button--marker--content, \"\");display:var(--r-radio-button--marker--display, block);width:var(--r-radio-button--marker--width, 0.75rem);height:var(--r-radio-button--marker--height, 0.75rem);position:var(--r-radio-button--marker--position, absolute);top:var(--r-radio-button--marker--top, calc(50% - 0.375rem));left:var(--r-radio-button--marker--left, calc(50% - 0.375rem));border-radius:var(--r-radio-button--marker--border-radius, 50%);background-color:var(--r-radio-button--marker--background-color, var(--r-background-interactive-regular, #282828));transition:var(--r-radio-button--marker--transition, 0.1s all);transform:var(--r-radio-button--marker--transform, scale(0));transform-origin:var(--r-radio-button--marker--transform-origin, center)}.r-radio-button--text{flex:var(--r-radio-button--text--flex, 1);display:var(--r-radio-button--text--display, flex);flex-direction:var(--r-radio-button--text--flex-direction, column);gap:var(--r-radio-button--text--gap, var(--r-spacing-025, 0.25rem));font-weight:var(--r-radio-button--text--font-weight, var(--r-font-weight-semibold, 600))}.r-radio-button--leading{min-height:var(--r-radio-button--leading--min-height, var(--r-spacing-150, 1.5rem));min-width:var(--r-radio-button--leading--min-width, calc(var(--r-spacing-150, 1.5rem) + 2 * var(--r-spacing-075, 0.75rem)));color:var(--r-radio-button--leading--color, var(--r-icon-soft, #686868));display:var(--r-radio-button--leading--display, flex);justify-content:var(--r-radio-button--leading--justify-content, center);align-items:var(--r-radio-button--leading--align-items, start)}";
|
|
4
4
|
|
|
@@ -70,7 +70,8 @@ const RadioButton = class {
|
|
|
70
70
|
/** Reference to the radio button elements */
|
|
71
71
|
get radioElements() {
|
|
72
72
|
if (this.groupEl) {
|
|
73
|
-
|
|
73
|
+
// Use :scope > to only select direct children, excluding nested radio-group buttons
|
|
74
|
+
return this.groupEl.querySelectorAll(`:scope > r-radio-button`);
|
|
74
75
|
}
|
|
75
76
|
if (this.parentFormEl) {
|
|
76
77
|
return this.parentFormEl.querySelectorAll(`r-radio-button[name=${this.name}]`);
|
|
@@ -123,11 +124,11 @@ const RadioButton = class {
|
|
|
123
124
|
required,
|
|
124
125
|
autofocus
|
|
125
126
|
};
|
|
126
|
-
return (h(Host, { key: '
|
|
127
|
-
h("div", { key: '
|
|
128
|
-
h("div", { key: '
|
|
129
|
-
h("r-hint", { key: '
|
|
130
|
-
h("r-hint", { key: '
|
|
127
|
+
return (h(Host, { key: 'cf6b1b5db202773a2c6eea4df6a9303275054a73' }, h("label", { key: '4e203583a2b779e239c2893eadccc3514f84b0c4', class: "r-radio-button", onClick: this.onClick, onKeyDown: this.onKeydown }, h("input", Object.assign({ key: '14e89b050928abd51b66e8637c39bbd8da8e9856' }, inputAttrs, { id: `${uniqueId}-input`, class: "r-radio-button--input", ref: el => this.nativeEl = el, onFocus: this.onFocus, onBlur: this.onBlur })), h("span", { key: 'ee55afd60c5dbb947e9c12fffc401f7acfcefada', class: "r-radio-button--box" }), this.isLeading &&
|
|
128
|
+
h("div", { key: 'eabd27b399dee0bc2cef0fb7a92adad55095708b', class: "r-radio-button--leading" }, h("slot", { key: '5ec99653141268456cf9c8b2398f70c7b1afd36d', name: "leading" }, this.icon && h("r-icon", { key: '47662e84ad1aac02e867ddd040b5b7e1890ba986', name: this.icon, size: "m" }))), h("div", { key: 'bcaaf67c6cdf95a0bfa0dd5784d69c237e551a0e', class: "r-radio-button--text" }, h("slot", { key: 'a54f1823afe368d85f9bd4743ac0aa1df7298049', name: "title" }, h("div", { key: 'b531b659b920d7f064f10e622b83099d14270935', style: { display: 'contents' } }, h("slot", { key: 'b51f3e83234681804c49cb1043d90de70e4929db' }))), h("slot", { key: 'd217abfd3675898afd5b41a543200f7104019aed', name: "description" }, this.description)), this.isTrailing &&
|
|
129
|
+
h("div", { key: '664ddcc19dba3029343532caa13b05a6e3834977', class: "r-radio-button--trailing" }, h("slot", { key: 'b4ec626236a01c9c74b20ae09194ea414bc7699c', name: "trailing" }))), invalid && error &&
|
|
130
|
+
h("r-hint", { key: 'bd60d4337984662f410613b470b6e3be695343f5', role: "alert", variant: "error", id: `${uniqueId}-hint` }, this.error), hint &&
|
|
131
|
+
h("r-hint", { key: '31c5712fe6f2164219e28484a40ce5452a836743', role: "note", variant: "information", id: `${uniqueId}-hint` }, hint)));
|
|
131
132
|
}
|
|
132
133
|
get host() { return getElement(this); }
|
|
133
134
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
import { a as appendControlToFormData } from './formData-DvLT8-y3.js';
|
|
3
3
|
|
|
4
|
-
const radioGroupCss = ":host{display:flex;flex-direction:column;box-sizing:border-box;margin-bottom:var(--r-spacing-100)}:host ::slotted(r-radio-button){display:var(--r-radio-group--slotted-radio-button--display, flex)}:host ::slotted(.focused){--r-radio-button--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-radio-button--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--outline-offset:2px}:host slot{display:contents}:host([variant=contained]) ::slotted(r-radio-button){padding:0;--r-radio-button--padding:var(--r-spacing-100, 1rem);--r-radio-button--border-color:var(--r-border-soft, #686868);--r-radio-button--border-width:1px}:host([invalid]:not([invalid=false])) ::slotted(r-radio-button){--r-radio-button--box--border-color:var(--r-status-error-regular, #b00c15);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6);--r-radio-button--marker--background-color:var(--r-status-error-regular, #b00c15)}:host .r-radio-group{display:var(--r-radio-group--display, flex);flex-direction:var(--r-radio-group--flex-direction, column)}:host .r-radio-group--label-container{display:var(--r-radio-group--label-container--display, flex);gap:var(--r-radio-group--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-radio-group--label-container--align-items, center);justify-content:var(--r-radio-group--label-container--justify-content, space-between)}:host .r-radio-group--label-container ::slotted([slot=popover]){display:var(--r-radio-group--popover--display, inline-flex);height:var(--r-radio-group--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-radio-group--popover--align-items, center);justify-content:var(--r-radio-group--popover--justify-content, center);margin-right:var(--r-radio-group--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-radio-group--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-radio-group--popover--trigger--min-height, var(--r-spacing-150, 1.5))}:host .r-radio-group--hint{margin-bottom:var(--r-radio-group--hint--margin-bottom, var(--r-spacing-100, 1rem))}:host .r-radio-group--content{display:var(--r-radio-group--content--display, flex);flex-direction:var(--r-radio-group--content--flex-direction, column);flex-wrap:var(--r-radio-group--content--flex-wrap, nowrap);gap:var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem))}:host .r-radio-group
|
|
4
|
+
const radioGroupCss = ":host{display:flex;flex-direction:column;box-sizing:border-box;margin-bottom:var(--r-spacing-100)}:host ::slotted(r-radio-button){display:var(--r-radio-group--slotted-radio-button--display, flex)}:host ::slotted(.focused){--r-radio-button--box-shadow:0 0 0 3px var(--r-border-focused-outlined, #fff), inset 0 0 0 1px var(--r-border-focused-outlined, #fff);--r-radio-button--outline:2px solid var(--r-border-focused, #0071e3);--r-radio-button--outline-offset:2px}:host slot{display:contents}:host([variant=contained]) ::slotted(r-radio-button){padding:0;--r-radio-button--padding:var(--r-spacing-100, 1rem);--r-radio-button--border-color:var(--r-border-soft, #686868);--r-radio-button--border-width:1px}:host([invalid]:not([invalid=false])) ::slotted(r-radio-button){--r-radio-button--box--border-color:var(--r-status-error-regular, #b00c15);--r-radio-button--box--background-color:var(--r-status-error-soft, #fef6f6);--r-radio-button--marker--background-color:var(--r-status-error-regular, #b00c15)}:host .r-radio-group{display:var(--r-radio-group--display, flex);flex-direction:var(--r-radio-group--flex-direction, column);padding:var(--r-radio-group--padding, 0);margin:var(--r-radio-group--margin, 0);border:var(--r-radio-group--border, none)}:host .r-radio-group--label-container{display:var(--r-radio-group--label-container--display, flex);gap:var(--r-radio-group--label-container--gap, var(--r-spacing-100, 1rem));align-items:var(--r-radio-group--label-container--align-items, center);justify-content:var(--r-radio-group--label-container--justify-content, space-between)}:host .r-radio-group--label-container ::slotted([slot=popover]){display:var(--r-radio-group--popover--display, inline-flex);height:var(--r-radio-group--popover--height, var(--r-spacing-150, 1.5));align-items:var(--r-radio-group--popover--align-items, center);justify-content:var(--r-radio-group--popover--justify-content, center);margin-right:var(--r-radio-group--popover--margin-right, -0.25rem);--r-popover--trigger--min-width:var(--r-radio-group--popover-trigger--min-width, var(--r-spacing-150, 1.5));--r-popover--trigger--min-height:var(--r-radio-group--popover--trigger--min-height, var(--r-spacing-150, 1.5))}:host .r-radio-group--hint{margin-bottom:var(--r-radio-group--hint--margin-bottom, var(--r-spacing-100, 1rem))}:host .r-radio-group--content{display:var(--r-radio-group--content--display, flex);flex-direction:var(--r-radio-group--content--flex-direction, column);flex-wrap:var(--r-radio-group--content--flex-wrap, nowrap);gap:var(--r-radio-group--content--gap, var(--r-spacing-050, 0.5rem))}:host .r-radio-group+.r-radio-group--message r-hint{margin-top:var(--r-radio-group--hint--margin-top, var(--r-spacing-050, 0.5rem))}";
|
|
5
5
|
|
|
6
6
|
const RadioGroup = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -78,8 +78,36 @@ const RadioGroup = class {
|
|
|
78
78
|
this.contributeToFormData = (event) => {
|
|
79
79
|
appendControlToFormData(this.host, event.formData);
|
|
80
80
|
};
|
|
81
|
+
/**
|
|
82
|
+
* Handles parent radio group value changes for nested groups.
|
|
83
|
+
* If this is a nested group with a parentValue specified, it will reset when
|
|
84
|
+
* the parent group's value changes to something other than the parentValue.
|
|
85
|
+
*/
|
|
86
|
+
this.onParentGroupChange = (event) => {
|
|
87
|
+
// Only proceed if this group has a parentValue specified (indicating it's nested)
|
|
88
|
+
if (!this.parentValue)
|
|
89
|
+
return;
|
|
90
|
+
const parentNewValue = event.detail.value;
|
|
91
|
+
// If parent changed to a different value than our parentValue, reset this nested group
|
|
92
|
+
if (parentNewValue !== this.parentValue) {
|
|
93
|
+
this.clearValue();
|
|
94
|
+
// Emit rReset event to notify that the nested group was automatically reset
|
|
95
|
+
this.rReset.emit({
|
|
96
|
+
element: this.host,
|
|
97
|
+
value: null
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
81
101
|
}
|
|
82
102
|
rChangeAction(event) {
|
|
103
|
+
// Only handle events from direct children, not from nested radio-groups
|
|
104
|
+
const targetElement = event.target;
|
|
105
|
+
const isDirectChild = targetElement.parentElement === this.host;
|
|
106
|
+
if (!isDirectChild) {
|
|
107
|
+
return; // Ignore events from nested radio-groups
|
|
108
|
+
}
|
|
109
|
+
// Stop event from bubbling to parent radio-groups
|
|
110
|
+
event.stopPropagation();
|
|
83
111
|
this.resetValidity();
|
|
84
112
|
this.setValue(event.detail.value);
|
|
85
113
|
}
|
|
@@ -89,6 +117,14 @@ const RadioGroup = class {
|
|
|
89
117
|
* to their initial values.
|
|
90
118
|
*/
|
|
91
119
|
radioButtonClickAction(event) {
|
|
120
|
+
// Only handle events from direct children, not from nested radio-groups
|
|
121
|
+
const targetElement = event.target;
|
|
122
|
+
const isDirectChild = targetElement.parentElement === this.host;
|
|
123
|
+
if (!isDirectChild) {
|
|
124
|
+
return; // Ignore events from nested radio-groups
|
|
125
|
+
}
|
|
126
|
+
// Stop event from bubbling to parent radio-groups
|
|
127
|
+
event.stopPropagation();
|
|
92
128
|
!event.target.disabled && event.target.select();
|
|
93
129
|
}
|
|
94
130
|
get selectedIndex() {
|
|
@@ -100,6 +136,7 @@ const RadioGroup = class {
|
|
|
100
136
|
return isnativeFirstElement || isNoSelected ? this.radioButtonElements.length - 1 : this.selectedIndex - 1;
|
|
101
137
|
}
|
|
102
138
|
get focusedRadioButtonEl() {
|
|
139
|
+
// Query all descendants to find focused element, but it will only be used for direct children
|
|
103
140
|
return this.host.querySelector('r-radio-button.focused');
|
|
104
141
|
}
|
|
105
142
|
get focusedRadioButtonElIndex() {
|
|
@@ -115,6 +152,14 @@ const RadioGroup = class {
|
|
|
115
152
|
}
|
|
116
153
|
radioButtonKeydownAction(event) {
|
|
117
154
|
var _a;
|
|
155
|
+
// Only handle events from direct children, not from nested radio-groups
|
|
156
|
+
const targetElement = event.target;
|
|
157
|
+
const isDirectChild = targetElement.parentElement === this.host;
|
|
158
|
+
if (!isDirectChild) {
|
|
159
|
+
return; // Ignore events from nested radio-groups
|
|
160
|
+
}
|
|
161
|
+
// Stop event from bubbling to parent radio-groups
|
|
162
|
+
event.stopPropagation();
|
|
118
163
|
switch (event.detail.code) {
|
|
119
164
|
case 'ArrowUp':
|
|
120
165
|
case 'ArrowLeft':
|
|
@@ -261,7 +306,8 @@ const RadioGroup = class {
|
|
|
261
306
|
return this.host.closest('form') || document.querySelector(`#${this.form}`) || null;
|
|
262
307
|
}
|
|
263
308
|
get radioButtonElements() {
|
|
264
|
-
|
|
309
|
+
// Use :scope > to only select direct children, excluding nested radio-group buttons
|
|
310
|
+
return this.host.querySelectorAll(':scope > r-radio-button:not([disabled]:not([disabled="false"]))');
|
|
265
311
|
}
|
|
266
312
|
get selectedRadioButtonElement() {
|
|
267
313
|
return Array.from(this.radioButtonElements).find(el => el.checked || el.hasAttribute('checked')) || null;
|
|
@@ -299,6 +345,11 @@ const RadioGroup = class {
|
|
|
299
345
|
const el = this.nativeSelectedEl || this.nativeFirstEl;
|
|
300
346
|
el === null || el === void 0 ? void 0 : el.setAttribute('tabindex', '0');
|
|
301
347
|
}
|
|
348
|
+
get parentRadioGroup() {
|
|
349
|
+
var _a;
|
|
350
|
+
// Find the parent radio group element
|
|
351
|
+
return ((_a = this.host.parentElement) === null || _a === void 0 ? void 0 : _a.closest('r-radio-group')) || null;
|
|
352
|
+
}
|
|
302
353
|
connectFormEventListeners() {
|
|
303
354
|
var _a, _b, _c;
|
|
304
355
|
(_a = this.parentFormEl) === null || _a === void 0 ? void 0 : _a.addEventListener('formdata', this.contributeToFormData);
|
|
@@ -311,11 +362,28 @@ const RadioGroup = class {
|
|
|
311
362
|
(_b = this.parentFormEl) === null || _b === void 0 ? void 0 : _b.removeEventListener('reset', this.onResetForm);
|
|
312
363
|
(_c = this.parentFormEl) === null || _c === void 0 ? void 0 : _c.removeEventListener('submit', this.onSubmitForm);
|
|
313
364
|
}
|
|
365
|
+
connectParentGroupListener() {
|
|
366
|
+
// Only connect if this is a nested group (has parentValue specified)
|
|
367
|
+
if (this.parentValue && this.parentRadioGroup) {
|
|
368
|
+
this.parentRadioGroup.addEventListener('rChange', this.onParentGroupChange);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
disconnectParentGroupListener() {
|
|
372
|
+
if (this.parentValue && this.parentRadioGroup) {
|
|
373
|
+
this.parentRadioGroup.removeEventListener('rChange', this.onParentGroupChange);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
get ariaDescribedBy() {
|
|
377
|
+
const messageId = `${this.uniqueId}-message`;
|
|
378
|
+
return this.hint ? `${this.uniqueId}-hint ${messageId}` : messageId;
|
|
379
|
+
}
|
|
314
380
|
connectedCallback() {
|
|
315
381
|
this.connectFormEventListeners();
|
|
382
|
+
this.connectParentGroupListener();
|
|
316
383
|
}
|
|
317
384
|
disconnectedCallback() {
|
|
318
385
|
this.disconnectFormEventListeners();
|
|
386
|
+
this.disconnectParentGroupListener();
|
|
319
387
|
}
|
|
320
388
|
componentWillLoad() {
|
|
321
389
|
const { required, name } = this;
|
|
@@ -330,18 +398,23 @@ const RadioGroup = class {
|
|
|
330
398
|
this.passPropsToGroupItems({ name, required });
|
|
331
399
|
this.setTabindex();
|
|
332
400
|
if (this.autofocus) {
|
|
333
|
-
|
|
401
|
+
// Use setTimeout to ensure setValue has completed and checked state is synced
|
|
402
|
+
setTimeout(() => {
|
|
334
403
|
this.setFocus();
|
|
335
|
-
});
|
|
404
|
+
}, 0);
|
|
336
405
|
}
|
|
337
406
|
}
|
|
338
407
|
render() {
|
|
339
408
|
const { label, hint, fieldIndicator, error, uniqueId, invalid } = this;
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
409
|
+
const fieldsetAttrs = {
|
|
410
|
+
'aria-invalid': `${invalid || false}`,
|
|
411
|
+
'aria-describedby': this.ariaDescribedBy
|
|
412
|
+
};
|
|
413
|
+
return (h(Host, { key: 'bd1b1d42f3efab78cf0a2cce7b1a1e2568f21765' }, h("fieldset", Object.assign({ key: 'c449667b014cf8aeea4176b0d94c82573b661182', class: "r-radio-group" }, fieldsetAttrs, { onClick: this.onLabelClick }), label &&
|
|
414
|
+
h("legend", { key: '212e27fd8d20b31cf6d84078870ec59796bb59c6', class: "r-radio-group--label-container" }, h("r-label", { key: '69907b0e2bdb49bcdea00d1849bc0c5c4d3404ae', id: `${uniqueId}-label`, class: "r-radio-group--label", "field-indicator": fieldIndicator }, label), h("slot", { key: 'd208c147248154ba26ecc5b412233d2cf479bb68', name: "popover" })), hint &&
|
|
415
|
+
h("r-hint", { key: 'b409e053226d88ac3619524b2d63864b49972985', id: `${uniqueId}-hint`, class: "r-radio-group--hint", role: "note" }, hint), h("div", { key: 'c8e98214e9b14f6fdcf97677b392abd14d653a56', class: "r-radio-group--content" }, h("slot", { key: '5e4aa07801e8f1bd7ec3262511d28f553d8740a7' })), h("div", { key: 'a576e8c91d33877eb677d5551ac18d10924586fd', id: `${uniqueId}-message`, "aria-live": "polite", role: "alert", class: "r-radio-group--message" }, invalid && error &&
|
|
416
|
+
h("r-hint", { key: '98f7fa6855c0803ae5d31a3a248c146679204af9', variant: "error" }, error), this.validityState !== 'valid' && this.validityMessage &&
|
|
417
|
+
h("r-hint", { key: 'de1997af842a7e5fdb887a830fd0fe701e4fa5ce', variant: "error" }, this.customErrorMessage || this.validityMessage)))));
|
|
345
418
|
}
|
|
346
419
|
get host() { return getElement(this); }
|
|
347
420
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
3
|
const selectOptionCss = ":host(:hover){--r-select-option--background-color:var(--r-background-interactive-hovered)}:host(:not([aria-disabled=true]):focus){outline:var(--outline, none);--r-select-option--background-color:var(--r-background-interactive-hovered);--r-select-option--border-color:var(--r-background-interactive-softest);--r-select-option--box-shadow:inset 0px 0px 0px 1px var(--r-border-focused-outlined, #fff), inset 0 0 0 3px var(--r-border-focused, #0071e3), inset 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-select-option--outline:2px solid var(--r-border-focused, #0071e3);--r-select-option--outline-offset:-4px;--r-select-option--z-index:1}:host([data-focused=true]){outline:var(--outline, none);--r-select-option--background-color:var(--r-background-interactive-hovered);--r-select-option--border-color:var(--r-background-interactive-softest);--r-select-option--box-shadow:inset 0px 0px 0px 1px var(--r-border-focused-outlined, #fff), inset 0 0 0 3px var(--r-border-focused, #0071e3), inset 0 0 0 4px var(--r-border-focused-outlined, #fff);--r-select-option--outline:2px solid var(--r-border-focused, #0071e3);--r-select-option--outline-offset:-4px}:host(:not([aria-disabled=true]):active){--r-select-option--background-color:var(--r-background-interactive-pressed)}:host([aria-disabled=true]),:host([aria-disabled=true]:hover),:host([aria-disabled=true]:focus){--r-select-option--opacity:0.4;--r-select-option--background-color:transparent}:host([aria-selected=true]){--r-select-option--font-weight:600;--r-select-option--background-color:var(--r-background-interactive-hovered)}:host([aria-hidden=true]){--r-select-option--display:none}:host([icon-position=end]){--r-select-option--flex-direction:row-reverse;--r-select-option--icon--margin-left:0.75em;--r-select-option--icon--margin-right:0}.r-select-option{box-sizing:var(--r-select-option--box-sizing);position:var(--r-select-option--position);display:var(--r-select-option--display, flex);flex-direction:var(--r-select-option--flex-direction, row);min-height:var(--r-select-option--min-height, 1.125em);width:var(--r-select-option--width, auto);font-size:var(--r-select-option--font-size, 1rem);line-height:var(--r-select-option--line-height, 1.2);font-weight:var(--r-select-option--font-weight, normal);padding-top:var(--r-select-option--padding-top, 0.75em);padding-right:var(--r-select-option--padding-right, 0.75em);padding-bottom:var(--r-select-option--padding-bottom, 0.75em);padding-left:var(--r-select-option--padding-left, 0.75em);align-items:var(--r-select-option--align-items, center);color:var(--r-select-option--color, inherit);background-color:var(--r-select-option--background-color, rgba(0, 0, 0, 0));border-color:var(--r-select-option--border-color, rgba(0, 0, 0, 0));border-radius:var(--r-select-option--border-radius, 0);border-width:var(--r-select-option--border-width, 1px);border-style:var(--r-select-option--border-style, solid);box-shadow:var(--r-select-option--box-shadow, none);outline:var(--r-select-option--outline, none);outline-offset:var(--r-select-option--outline-offset, 0);transform:var(--r-select-option--transform, none);z-index:var(--r-select-option--z-index, 0);opacity:var(--r-select-option--opacity, 1)}.r-select-option--icon{display:var(--r-select-option--icon--display, inline-flex);align-items:var(--r-select-option--icon--align-items, center);justify-content:var(--r-select-option--icon--justify-content, center);margin-top:var(--r-select-option--icon--margin-top, 0.05em);margin-left:var(--r-select-option--icon--margin-left, 0);margin-right:var(--r-select-option--icon--margin-right, 0.75em)}.r-select-option--icon svg{display:var(--r-select-option--icon--svg--display, inline-flex)}.r-select-option--label{max-width:var(--r-select-option--label--max-width, 100%);text-overflow:var(--r-select-option--label--text-overflow, ellipsis);white-space:var(--r-select-option--label--white-space, normal)}";
|
|
4
4
|
|
|
@@ -119,7 +119,7 @@ const SelectOption = class {
|
|
|
119
119
|
size: iconSize,
|
|
120
120
|
color: iconColor
|
|
121
121
|
};
|
|
122
|
-
return (h(Host, { key: '
|
|
122
|
+
return (h(Host, { key: 'd75c7a753d325360d4bee79ef7b96fbedd2d9b96', id: uniqueId, role: "option", onClick: this.handleClick, onKeydown: this.handleKeydown, "aria-disabled": `${disabled}`, "aria-selected": `${this.isSelected}`, "data-value": this.definedValue, "data-focused": `${this.isFocused}` }, h("div", { key: '8d8d449a5352f90d7731df10ea011856537b02f4', class: "r-select-option" }, icon && h("span", { key: 'f74192805472c8023b921f0a2869772f4c007d78', class: "r-select-option--icon" }, h("r-icon", Object.assign({ key: '6ac112921c222e83df33b2cf0113f3b158a98407' }, iconAttributes))), !icon && hasIconSlot && h("span", { key: '8c5779ab3446a8d4b8880bf1f9958f02d32ca5e4', class: "r-select-option--icon" }, h("slot", { key: '05647b1a0f7fb6f3c996461a825d8d60bb966b50', name: "icon" })), h("span", { key: 'a4de330d788288995da81cd7cbe7a9f8e9ba44c0', class: "r-select-option--label" }, h("slot", { key: '2cb6ac3d005a3bf9b75b0c23d27cbf1930bc15cc' })))));
|
|
123
123
|
}
|
|
124
124
|
get host() { return getElement(this); }
|
|
125
125
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
import { a as appendControlToFormData } from './formData-DvLT8-y3.js';
|
|
3
3
|
import { S as StyleObserver } from './style-observer-4Uv3PpKT.js';
|
|
4
4
|
|
|
@@ -446,7 +446,9 @@ const Select = class {
|
|
|
446
446
|
if (!this.isExpanded)
|
|
447
447
|
return;
|
|
448
448
|
e.stopPropagation();
|
|
449
|
-
|
|
449
|
+
const path = e.composedPath ? e.composedPath() : [];
|
|
450
|
+
const isInsideSelect = path.includes(this.host);
|
|
451
|
+
if (!isInsideSelect) {
|
|
450
452
|
this.collapse();
|
|
451
453
|
this.reportValidity();
|
|
452
454
|
}
|
|
@@ -1081,8 +1083,8 @@ const Select = class {
|
|
|
1081
1083
|
disabled,
|
|
1082
1084
|
required: isRequired
|
|
1083
1085
|
};
|
|
1084
|
-
return (h(Host, { key: '
|
|
1085
|
-
h("r-hint", { key: '
|
|
1086
|
+
return (h(Host, { key: 'f52fa96bdacace6070cd2baa15f8fab939d05916', "data-value": this.currentValue, expanded: !this.disabled && this.isExpanded, "data-listbox-position": this.listboxPositionState, "data-initial-value": this.initial['value'], "data-is-placeholder": `${!!this.isPlaceholder}`, "data-value-focused": `${!!this.isValueFocused}`, "data-option-focused": `${!!this.focusedOption}`, "data-validity-state": `${this.validityState || ''}`, "data-validity-message": `${this.validityMessage || ''}`, "data-readonly": `${!!this.isReadonly}`, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, h("div", { key: '80326d43674f8caac11678ca4d5a6ca8178f9454', class: `r-select--label ${!internal ? 'r-select--label__margin-bottom' : ''}` }, h("div", { key: '25fa25960350a338c7c9156d38c974c0ad8a0861', class: internal ? 'visually-hidden' : 'r-select--label-container' }, h("label", { key: 'b52ac4d91e32df39459492bbeaf166d2a71d165c', id: `${uniqueId}-label`, onClick: this.isInteractive ? this.onValueClick : null }, h("r-label", Object.assign({ key: 'ac75955086f424e781baf66e6853cbc89ec20d56' }, labelAttr), label)), h("slot", { key: '4cd953da5c64a473070ce4b8a3e5721a36561685', name: "popover" })), hint &&
|
|
1087
|
+
h("r-hint", { key: '2d6a2e9eae51d56f31886725274c637e76ab4d75', id: `${uniqueId}-hint`, class: "r-select--hint" }, hint)), h("div", { key: '8107a1d2475d11d6e827d7394ade84f9c4c85ea5', class: "r-select" }, h("select", Object.assign({ key: 'd7a60a4ff2f8f568da1ea90d859d5de78a1e73ef', class: "r-select--native", ref: el => this.nativeElement = el }, nativeAttrs)), h("div", { key: '9d49470c7e4cc179dfd93cb1233e2bbf86ac7641', class: "r-select--container" }, this.combobox ? this.renderCombobox(comboboxAttrs) : this.renderSelect(comboboxAttrs), h("div", Object.assign({ key: '9594f3439c7591a4e4ef359a205a55d1c56dbb80', role: "listbox", tabindex: "-1", id: `${uniqueId}-list`, class: "r-select--options", ref: el => this.listboxElement = el }, listboxAttrs), (this.isNoResultsFound || !((_a = this.optionElements) === null || _a === void 0 ? void 0 : _a.length)) && h("r-select-option", { key: 'ae0ef701ff3e7db4c17aba7d57265122c3bf6587', "data-no-results": "true", value: "no_results" }, this.noResultsFound), h("slot", { key: '012fcee55283c7bc5a3230ff23b692eca33d853b', onSlotchange: this.handleSlotChange })))), h("div", { key: '94fc769d8eeb0bd92f1d12d553b033a3de9ad8dc', id: `${uniqueId}-message`, "aria-live": "polite", "aria-atomic": "true", ref: (el) => this.messageContainer = el, class: this.hasMessage && !internal ? 'r-select--message' : 'visually-hidden' }, this.hasMessage && h("r-hint", { key: '881e60130bd3cbc9004aacbb027911357286a516', variant: this.invalid ? 'error' : 'success' }, this.hasError && this.error, this.hasValidationError && this.validityMessage))));
|
|
1086
1088
|
}
|
|
1087
1089
|
get host() { return getElement(this); }
|
|
1088
1090
|
static get watchers() { return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
3
|
const skipLinkCss = ":host{display:inline-block;position:absolute;z-index:99999}:host:has(:not(:focus-within)){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host:has(:focus-within){top:var(--r-spacing-100);padding:var(--r-spacing-100);border:1px solid var(--r-border-regular);background:var(--r-background-softest);left:var(--r-skip-link--left, 50%);transform:var(--r-skip-link--transform, translateX(-50%))}:host([position=left]){--r-skip-link--left:var(--r-spacing-100);--r-skip-link--transform:none}::slotted(*:not(:focus-within)){clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ const SkipLink = class {
|
|
|
9
9
|
this.position = 'center';
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '08280b6003ccf78bf96eba9778fd3ddcaebc8947' }, h("slot", { key: '7808e8156601912e0192fe0b74bdedda2c359e1c' })));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
SkipLink.style = skipLinkCss;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
|
-
const stepperItemCss = ":host([active]){--r-stepper-item--indicator--background-color:var(--r-background-inverse, #282828);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}:host([complete]){--r-stepper-item--indicator--background-color:var(--r-status-success-regular, #298535);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}.r-stepper-item{display:var(--r-stepper-item--display, flex);flex-direction:var(--r-stepper-item--flex-direction, column);align-items:var(--r-stepper-item--align-items, center);justify-content:var(--r-stepper-item--justify-content, center);font-size:var(--r-stepper-item--font-size, var(--r-font-size-200,
|
|
3
|
+
const stepperItemCss = ":host([active]){--r-stepper-item--indicator--background-color:var(--r-background-inverse, #282828);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}:host([complete]){--r-stepper-item--indicator--background-color:var(--r-status-success-regular, #298535);--r-stepper-item--color:var(--r-text-inverse, #FFF);--r-stepper-item--text--color:var(--r-text-regular, #282828);--r-stepper-item--indicator--border-color:transparent}::slotted(.visually-hidden),[data-visually-hidden-only=true],.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.r-stepper-item{display:var(--r-stepper-item--display, flex);flex-direction:var(--r-stepper-item--flex-direction, column);align-items:var(--r-stepper-item--align-items, center);justify-content:var(--r-stepper-item--justify-content, center);font-size:var(--r-stepper-item--font-size, var(--r-font-size-200, 0.8125rem));color:var(--r-stepper-item--color, var(--r-text-regular, #282828));font-family:var(--r-stepper-item--font-family, var(--r-font-family-text, system-ui));width:var(--r-stepper-item--width, var(--r-spacing-225, 2.25rem));white-space:var(--r-stepper-item--white-space, nowrap);gap:var(--r-stepper-item--gap, var(--r-spacing-100, 0.5rem))}.r-stepper-item--indicator{width:var(--r-stepper-item--indicator--width, var(--r-spacing-125, 1.25rem));height:var(--r-stepper-item--indicator--height, var(--r-spacing-125, 1.25rem));line-height:var(--r-stepper-item--indicator--line-height, var(--r-spacing-125, 1.25rem));border-radius:var(--r-stepper-item--indicator--border-radius, 50%);background-color:var(--r-stepper-item--indicator--background-color, transparent);display:var(--r-stepper-item--indicator--display, flex);justify-content:var(--r-stepper-item--indicator--justify-content, center);align-items:var(--r-stepper-item--indicator--align-items, center);border-width:var(--r-stepper-item--indicator--border-width, 1px);border-style:var(--r-stepper-item--indicator--border-style, solid);border-color:var(--r-stepper-item--indicator--border-color, var(--r-text-regular, #282828));margin-left:var(--r-stepper-item--indicator--margin-left, var(--r-spacing-100, 0.5rem));margin-right:var(--r-stepper-item--indicator--margin-right, var(--r-spacing-100, 0.5rem))}.r-stepper-item--indicator--step-number{vertical-align:var(--r-stepper-item--step-number--vertical-align, middle)}.r-stepper-item--text{font-size:var(--r-stepper-item--text--font-size, var(--r-font-size-200, 0.8125rem));color:var(--r-stepper-item--text--color, var(--r-text-regular, #282828));text-align:var(--r-stepper-item--text--text-align, center)}";
|
|
4
4
|
|
|
5
5
|
const StepperItem = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -10,13 +10,28 @@ const StepperItem = class {
|
|
|
10
10
|
/** Defines a property active that determines whether the step is active */
|
|
11
11
|
this.active = false;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Checks if the slot contains only visually-hidden elements (no visible text).
|
|
15
|
+
* Returns true if only visually-hidden elements are present.
|
|
16
|
+
*/
|
|
17
|
+
get hasOnlyVisuallyHiddenContent() {
|
|
18
|
+
var _a;
|
|
19
|
+
const textContent = ((_a = this.host.textContent) === null || _a === void 0 ? void 0 : _a.trim()) || '';
|
|
20
|
+
const visuallyHiddenElement = this.host.querySelector('.visually-hidden');
|
|
21
|
+
if (!visuallyHiddenElement) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
const visuallyHiddenText = visuallyHiddenElement.textContent || '';
|
|
25
|
+
const remainingText = textContent.replace(visuallyHiddenText.trim(), '').trim();
|
|
26
|
+
return !remainingText.length;
|
|
27
|
+
}
|
|
13
28
|
get hasText() {
|
|
14
29
|
return this.host.textContent.trim().length > 0;
|
|
15
30
|
}
|
|
16
31
|
render() {
|
|
17
32
|
const number = this.number || this.stepNumber;
|
|
18
|
-
return (h(Host, { key: '
|
|
19
|
-
h("div", { key: '
|
|
33
|
+
return (h(Host, { key: '4f55b5491ec5eee7cad6313fa85e7d6cc89b2178', role: "listitem", "aria-current": this.active ? 'step' : null }, h("div", { key: '2864f0e19f2f11af0f8674b9a701cd948024c085', class: "r-stepper-item" }, h("div", { key: 'de896ec98a13a4b20965a3ca58c5517a30de1f74', class: "r-stepper-item--indicator" }, this.complete ? (h("r-icon", { name: "check", size: "s" })) : this.icon ? (h("r-icon", { name: this.icon, iconAriaLabel: this.label, size: "s" })) : number !== undefined ? (h("span", { "aria-hidden": `${!this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--indicator--step-number" }, number)) : null), this.hasText &&
|
|
34
|
+
h("div", { key: 'cf3b6b5e3f4454830ecce06a6b6c16225aadd93e', "data-visually-hidden-only": `${this.hasOnlyVisuallyHiddenContent}`, class: "r-stepper-item--text" }, h("slot", { key: '65bd1f231c445f9681750c71ef156297edbf05fb' })))));
|
|
20
35
|
}
|
|
21
36
|
get host() { return getElement(this); }
|
|
22
37
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
|
-
const stepperCss = ".r-stepper{display:var(--r-stepper--display, flex);align-items:var(--r-stepper--align-items, top)}.r-stepper>r-stepper-item,.r-stepper ::slotted(r-stepper-item){display:var(--r-stepper--slotted--stepper-item--display, flex)}.r-stepper>r-stepper-item:not(:last-of-type),.r-stepper ::slotted(r-stepper-item:not(:last-child)){flex:var(--r-stepper--slotted--stepper-item--flex, 1)}.r-stepper>r-stepper-item:not(:last-of-type)::after,.r-stepper ::slotted(r-stepper-item:not(:last-child))::after{content:var(--r-stepper-divider--content, \"\");display:var(--r-stepper-divider--display, block);position:var(--r-stepper-divider--position, relative);width:var(--r-stepper-divider--width, 100%);height:var(--r-stepper-divider--height, 1px);top:var(--r-stepper-divider--top,
|
|
3
|
+
const stepperCss = ".r-stepper{display:var(--r-stepper--display, flex);align-items:var(--r-stepper--align-items, top);list-style-type:var(--r-stepper--list-style-type, none);padding:var(--r-stepper--padding, 0);margin:var(--r-stepper--margin, 0)}.r-stepper>r-stepper-item,.r-stepper ::slotted(r-stepper-item){display:var(--r-stepper--slotted--stepper-item--display, flex)}.r-stepper>r-stepper-item:not(:last-of-type),.r-stepper ::slotted(r-stepper-item:not(:last-child)){flex:var(--r-stepper--slotted--stepper-item--flex, 1)}.r-stepper>r-stepper-item:not(:last-of-type)::after,.r-stepper ::slotted(r-stepper-item:not(:last-child))::after{content:var(--r-stepper-divider--content, \"\");display:var(--r-stepper-divider--display, block);position:var(--r-stepper-divider--position, relative);width:var(--r-stepper-divider--width, 100%);height:var(--r-stepper-divider--height, 1px);top:var(--r-stepper-divider--top, 0.625rem);background-color:var(--r-stepper-divider--background-color, var(--r-text-regular, #282828))}";
|
|
4
4
|
|
|
5
|
+
const OFFSET = 20;
|
|
5
6
|
const Stepper = class {
|
|
6
7
|
constructor(hostRef) {
|
|
7
8
|
registerInstance(this, hostRef);
|
|
@@ -9,15 +10,87 @@ const Stepper = class {
|
|
|
9
10
|
this.completed = 0;
|
|
10
11
|
/** _DEPRECATED_ (use `completed` instead) Completed steps. Default value 0 */
|
|
11
12
|
this.completeSteps = 0;
|
|
13
|
+
/** Label for completed steps for screen reader users. */
|
|
14
|
+
this.completedStepsLabel = 'Completed';
|
|
15
|
+
this.handleSlotChange = () => {
|
|
16
|
+
this.setStepStatus();
|
|
17
|
+
this.updateVisibilityOfStepText();
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
handleCompletedStepsLabelChange() {
|
|
21
|
+
this.setStepStatus();
|
|
22
|
+
}
|
|
23
|
+
onResize() {
|
|
24
|
+
this.updateVisibilityOfStepText();
|
|
12
25
|
}
|
|
13
26
|
get hasSteps() {
|
|
14
27
|
return this.host.querySelectorAll('r-stepper-item').length > 0;
|
|
15
28
|
}
|
|
29
|
+
componentDidLoad() {
|
|
30
|
+
this.setStepStatus();
|
|
31
|
+
this.updateVisibilityOfStepText();
|
|
32
|
+
}
|
|
33
|
+
setStepStatus() {
|
|
34
|
+
var _a;
|
|
35
|
+
const innerSteps = ((_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('r-stepper-item')) || [];
|
|
36
|
+
const slotSteps = this.host.querySelectorAll('r-stepper-item') || [];
|
|
37
|
+
const allSteps = [...Array.from(innerSteps), ...Array.from(slotSteps)];
|
|
38
|
+
allSteps === null || allSteps === void 0 ? void 0 : allSteps.forEach((step) => {
|
|
39
|
+
const existingSpan = step.querySelector('.visually-hidden');
|
|
40
|
+
if (existingSpan) {
|
|
41
|
+
existingSpan.remove();
|
|
42
|
+
}
|
|
43
|
+
const span = document.createElement('span');
|
|
44
|
+
span.className = 'visually-hidden';
|
|
45
|
+
span.textContent = `${step.complete ? `${this.completedStepsLabel}.` : ''}`;
|
|
46
|
+
step.prepend(span);
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
getTextElementWidth(stepElement) {
|
|
50
|
+
var _a;
|
|
51
|
+
const textElement = (_a = stepElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.r-stepper-item--text');
|
|
52
|
+
if (!textElement)
|
|
53
|
+
return 0;
|
|
54
|
+
// Temporarily remove visually-hidden to get the natural width
|
|
55
|
+
const wasHidden = textElement.classList.contains('visually-hidden');
|
|
56
|
+
if (wasHidden) {
|
|
57
|
+
textElement.classList.remove('visually-hidden');
|
|
58
|
+
}
|
|
59
|
+
const width = textElement.offsetWidth;
|
|
60
|
+
// Restore the previous state
|
|
61
|
+
if (wasHidden) {
|
|
62
|
+
textElement.classList.add('visually-hidden');
|
|
63
|
+
}
|
|
64
|
+
return width;
|
|
65
|
+
}
|
|
66
|
+
updateVisibilityOfStepText() {
|
|
67
|
+
const slotSteps = this.host.querySelectorAll('r-stepper-item') || [];
|
|
68
|
+
let totalWidth = 0;
|
|
69
|
+
slotSteps.forEach((step) => {
|
|
70
|
+
totalWidth += this.getTextElementWidth(step) + OFFSET;
|
|
71
|
+
});
|
|
72
|
+
const isOverflowing = totalWidth >= this.host.offsetWidth;
|
|
73
|
+
if (isOverflowing) {
|
|
74
|
+
slotSteps.forEach((step) => {
|
|
75
|
+
var _a;
|
|
76
|
+
(_a = step.shadowRoot.querySelector('.r-stepper-item--text')) === null || _a === void 0 ? void 0 : _a.classList.add('visually-hidden');
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
slotSteps.forEach((step) => {
|
|
81
|
+
var _a;
|
|
82
|
+
(_a = step.shadowRoot.querySelector('.r-stepper-item--text')) === null || _a === void 0 ? void 0 : _a.classList.remove('visually-hidden');
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
16
86
|
render() {
|
|
17
87
|
const completed = this.completed || this.completeSteps;
|
|
18
|
-
return (h(Host, { key: '
|
|
88
|
+
return (h(Host, { key: '9a8684fe78d610b90c824a8bd06371efc222b94a' }, h("ol", { key: '89c37db27cab79946f29e5302784f3a17c853cef', class: "r-stepper", "aria-label": this.label || null }, !this.hasSteps && Array.from({ length: this.total }, (_, index) => (h("r-stepper-item", { number: index + 1, complete: completed > index, active: completed === index, key: index }))), h("slot", { key: '92d043648fb9c12ca5222a569ec40a917798af5a', onSlotchange: this.handleSlotChange }))));
|
|
19
89
|
}
|
|
20
90
|
get host() { return getElement(this); }
|
|
91
|
+
static get watchers() { return {
|
|
92
|
+
"completedStepsLabel": ["handleCompletedStepsLabelChange"]
|
|
93
|
+
}; }
|
|
21
94
|
};
|
|
22
95
|
Stepper.style = stepperCss;
|
|
23
96
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
3
|
const tabPanelCss = ":host([active]:not([active=false])){display:block}:host{display:none;outline:none}:host(:focus-visible){box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);outline:2px solid var(--r-border-focused, #0071e3);outline-offset:2px}.r-tab-panel{font-family:var(--r-tab-panel--font-family, var(--r-font-family-text, system-ui));font-size:var(--r-tab-panel--font-size, var(--r-font-size-text-400, 1rem))}";
|
|
4
4
|
|
|
@@ -16,7 +16,7 @@ const RTabPanel = class {
|
|
|
16
16
|
active,
|
|
17
17
|
'aria-labelledby': tabId
|
|
18
18
|
};
|
|
19
|
-
return (h(Host, Object.assign({ key: '
|
|
19
|
+
return (h(Host, Object.assign({ key: 'f58718704b5625e82bfa531bcbf2b6c94c2e1ae3', class: "r-typography" }, hostAttrs), h("div", { key: '75dc2720b47da749a4d1e168e20338b94724a369', class: "r-tab-panel" }, h("slot", { key: '9710a7fc07751091c4ec0c97ae1d205ae540fdfd' }))));
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
RTabPanel.style = tabPanelCss;
|
package/dist/esm/r-tab.entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CTxpqopm.js';
|
|
2
2
|
|
|
3
|
-
const tabCss = ":host{display:flex;outline:none;opacity:1;cursor:pointer}:host(:hover:not([disabled]:not([disabled=false]))){--r-tab--
|
|
3
|
+
const tabCss = ":host{display:flex;outline:none;opacity:1;cursor:pointer}:host(:hover:not([disabled]:not([disabled=false]))){--r-tab--background:var(--r-background-interactive-hovered, rgba(40, 40, 40, 0.04))}:host(:active:not([disabled]:not([disabled=false]))){--r-tab--background:var(--r-background-interactive-pressed, rgba(40,40,40,0.12))}:host(:focus-visible){--r-tab--box-shadow:0 0 0 6px var(--r-border-focused-outlined, #fff);--r-tab--outline:2px solid var(--r-border-focused, #0071e3);--r-tab--outline-offset:2px}:host([active]:not([active=false])){cursor:default;--r-tab--font-weight:var(--r-font-weight-semibold, 600);--r-tab--marker--visibility:visible}:host([disabled]:not([disabled=false])){cursor:not-allowed;--r-tab--pointer-events:none;--r-tab--color:var(--r-text-soft, #686868);--r-tab--marker--background-color:var(--r-border-soft, #686868)}.r-tab{position:var(--r-tab--position, relative);font-family:var(--r-tab--font-family, var(--r-font-family-text, system-ui));font-weight:var(--r-tab--font-weight, var(--r-font-weight-regular, 400));font-size:var(--r-tab--font-size, var(--r-font-size-400, 1rem));line-height:var(--r-tab--line-height, var(--r-line-height-m, 1.5));cursor:var(--r-tab--cursor, inherit);pointer-events:var(--r-tab--pointer-events, initial);display:var(--r-tab--display, flex);align-items:var(--r-tab--align-items, center);justify-content:var(--r-tab--justify-content, center);gap:var(--r-tab--gap, var(--r-spacing-050, 0.5rem));width:var(--r-tab--width, auto);padding-top:var(--r-tab--padding-top, var(--r-spacing-025, 0.25rem));padding-right:var(--r-tab--padding-right, var(--r-spacing-050, 0.5rem));padding-bottom:var(--r-tab--padding-bottom, var(--r-spacing-100, 1rem));padding-left:var(--r-tab--padding-left, var(--r-spacing-050, 0.5rem));margin-bottom:var(--r-tab--margin-bottom, -1px);opacity:var(--r-tab--opacity, 1);background:var(--r-tab--background, none);color:var(--r-tab--color, var(--r-text-regular, #282828));border:var(--r-tab--border, none);box-shadow:var(--r-tab--box-shadow, none);outline:var(--r-tab--outline, none);outline-offset:var(--r-tab--outline-offset, 0)}.r-tab::after{content:var(--r-tab--marker--content, \"\");width:var(--r-tab--marker--width, 100%);height:var(--r-tab--marker--height, 3px);position:var(--r-tab--marker--position, absolute);bottom:var(--r-tab--marker--bottom, 0);left:var(--r-tab--marker--left, 0);visibility:var(--r-tab--marker--visibility, hidden);background-color:var(--r-tab--marker--background-color, var(--r-border-regular, #282828));transition:var(--r-tab--marker--transition, all 0.1s ease-in)}.r-tab--disabled-icon,.r-tab ::slotted([slot=icon]){color:var(--r-tab--icon--color, var(--r-icon-soft, #686868))}@media (prefers-reduced-motion){.r-tab::after{transition:none}}";
|
|
4
4
|
|
|
5
5
|
const RTab = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -28,6 +28,8 @@ const RTab = class {
|
|
|
28
28
|
if (this.disabled)
|
|
29
29
|
return;
|
|
30
30
|
switch (event.code) {
|
|
31
|
+
case 'ArrowLeft':
|
|
32
|
+
case 'ArrowRight':
|
|
31
33
|
case 'Space':
|
|
32
34
|
case 'Home':
|
|
33
35
|
case 'End':
|
|
@@ -47,7 +49,9 @@ const RTab = class {
|
|
|
47
49
|
'aria-selected': `${active}`,
|
|
48
50
|
'aria-disabled': `${disabled}`
|
|
49
51
|
};
|
|
50
|
-
return (h(Host, Object.assign({ key: '
|
|
52
|
+
return (h(Host, Object.assign({ key: '270a02c942f223ef5ac0f9f83d33c51bfd88c1c7', onClick: this.handleClick, onKeyUp: this.handleKeyup, onKeyDown: this.handleKeydown }, hostAttrs), h("span", { key: '60bbf17ad69478028579b61d03ca316a55ce52ea', class: "r-tab" }, disabled ?
|
|
53
|
+
h("r-icon", { class: "r-tab--disabled-icon", size: "s", name: "circle-slash" })
|
|
54
|
+
: h("slot", { name: "icon" }), h("slot", { key: '5b0582bebdf14a0de908d23d2a08d80cf1850b50' }))));
|
|
51
55
|
}
|
|
52
56
|
get host() { return getElement(this); }
|
|
53
57
|
};
|