@duetds/components 5.3.5 → 5.4.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/hydrate/index.js +45 -9
- package/lib/cjs/duet-action-button.cjs.entry.js +24 -6
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +1 -1
- package/lib/cjs/duet-button_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-caption_4.cjs.entry.js +2 -2
- package/lib/cjs/duet-card.cjs.entry.js +2 -2
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +2 -2
- package/lib/cjs/duet-combobox.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +1 -1
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +2 -2
- package/lib/cjs/duet-input_2.cjs.entry.js +21 -4
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +2 -2
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-pagination_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +1 -1
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{focus-utils-84c29960.js → focus-utils-7c1832b2.js} +1 -1
- package/lib/cjs/{index-772cc42f.js → index-63f324e3.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/cjs/{token-utils-50a1f7e2.js → token-utils-fef5b4eb.js} +1 -0
- package/lib/collection/components/duet-action-button/duet-action-button.js +44 -8
- package/lib/collection/components/duet-collapsible/duet-collapsible.js +1 -1
- package/lib/collection/components/duet-input/duet-input.js +21 -3
- package/lib/collection/components/duet-upload/duet-upload.js +1 -1
- package/lib/collection/utils/token-utils.js +1 -1
- package/lib/custom-elements-bundle/index.js +46 -12
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-bacb27a1.js → p-03957a48.js} +1 -1
- package/lib/duet/p-0416a99f.entry.js +4 -0
- package/lib/duet/p-0b3f7f25.entry.js +4 -0
- package/lib/duet/{p-b74364d3.entry.js → p-0d8f88c8.entry.js} +1 -1
- package/lib/duet/p-0f69bf5d.entry.js +4 -0
- package/lib/duet/{p-8c282db8.system.js → p-0f6e4db9.system.js} +1 -1
- package/lib/duet/{p-89f53f18.system.entry.js → p-128ee483.system.entry.js} +1 -1
- package/lib/duet/{p-8f74030a.entry.js → p-14acc501.entry.js} +1 -1
- package/lib/duet/{p-8708f306.system.entry.js → p-19cac237.system.entry.js} +1 -1
- package/lib/duet/{p-442f1dd5.entry.js → p-1dec0f2c.entry.js} +1 -1
- package/lib/duet/{p-a818e289.entry.js → p-21d74fec.entry.js} +1 -1
- package/lib/duet/{p-7de54632.entry.js → p-23a1875c.entry.js} +1 -1
- package/lib/duet/{p-8eb6610c.system.entry.js → p-2522f85c.system.entry.js} +1 -1
- package/lib/duet/{p-64a691e3.entry.js → p-282ee56b.entry.js} +1 -1
- package/lib/duet/{p-ba0a4b7e.system.entry.js → p-30153133.system.entry.js} +1 -1
- package/lib/duet/{p-35d6061d.system.entry.js → p-347a4bb8.system.entry.js} +1 -1
- package/lib/duet/{p-3d27e5ed.system.entry.js → p-355fd4fc.system.entry.js} +1 -1
- package/lib/duet/{p-4903478e.entry.js → p-3b06dacd.entry.js} +1 -1
- package/lib/duet/{p-b88b18c3.entry.js → p-3bdc0b4e.entry.js} +1 -1
- package/lib/duet/{p-909aaac4.entry.js → p-40d4bc49.entry.js} +1 -1
- package/lib/duet/{p-ce276fc8.js → p-413df442.js} +1 -1
- package/lib/duet/{p-c0d98307.system.entry.js → p-426854f8.system.entry.js} +1 -1
- package/lib/duet/{p-8a472df4.system.entry.js → p-46f6dea4.system.entry.js} +1 -1
- package/lib/duet/{p-4fd4ddda.entry.js → p-4b50c47b.entry.js} +1 -1
- package/lib/duet/{p-16bc9a7e.system.entry.js → p-538ca1e8.system.entry.js} +1 -1
- package/lib/duet/{p-86a47942.entry.js → p-56081d74.entry.js} +1 -1
- package/lib/duet/{p-01ccafd3.system.entry.js → p-568fe563.system.entry.js} +2 -2
- package/lib/duet/{p-e36b95e0.system.entry.js → p-5d5c0181.system.entry.js} +1 -1
- package/lib/duet/{p-ff94713b.entry.js → p-5fea867d.entry.js} +1 -1
- package/lib/duet/p-6002f3d2.system.js +4 -0
- package/lib/duet/{p-12b8cb2f.system.entry.js → p-62352bbe.system.entry.js} +1 -1
- package/lib/duet/{p-e40b610d.entry.js → p-671453a4.entry.js} +1 -1
- package/lib/duet/{p-631054f3.system.js → p-67cbfa71.system.js} +1 -1
- package/lib/duet/{p-b972e7b7.system.entry.js → p-6944e2d1.system.entry.js} +1 -1
- package/lib/duet/{p-4e8f57dd.entry.js → p-6aece7e2.entry.js} +1 -1
- package/lib/duet/{p-e980faf9.system.entry.js → p-6f073ee3.system.entry.js} +1 -1
- package/lib/duet/{p-0b426a83.system.entry.js → p-70886ae8.system.entry.js} +1 -1
- package/lib/duet/{p-411bec39.system.entry.js → p-723b036a.system.entry.js} +1 -1
- package/lib/duet/{p-fab89c9d.system.entry.js → p-767767ad.system.entry.js} +1 -1
- package/lib/duet/{p-f9045aab.system.entry.js → p-768141d2.system.entry.js} +2 -2
- package/lib/duet/{p-dfa92326.entry.js → p-77b7fbcd.entry.js} +1 -1
- package/lib/duet/{p-8fa7559b.system.entry.js → p-7ad2c618.system.entry.js} +1 -1
- package/lib/duet/{p-05ff2672.entry.js → p-7df06bf2.entry.js} +1 -1
- package/lib/duet/{p-ea806947.entry.js → p-86575e21.entry.js} +1 -1
- package/lib/duet/p-86ed3c73.system.entry.js +4 -0
- package/lib/duet/{p-1717ed62.entry.js → p-8717227c.entry.js} +1 -1
- package/lib/duet/{p-d06f9b6c.entry.js → p-87738b6e.entry.js} +1 -1
- package/lib/duet/{p-e6fdaa31.entry.js → p-8d175e68.entry.js} +1 -1
- package/lib/duet/{p-b48811b5.entry.js → p-8fb5f933.entry.js} +1 -1
- package/lib/duet/{p-32dd246d.entry.js → p-9062ca61.entry.js} +1 -1
- package/lib/duet/{p-9071d4e1.system.entry.js → p-909a229b.system.entry.js} +1 -1
- package/lib/duet/{p-b787e777.system.entry.js → p-909b6b44.system.entry.js} +1 -1
- package/lib/duet/{p-97bb6fdd.system.entry.js → p-967eb38f.system.entry.js} +1 -1
- package/lib/duet/{p-0d188b2d.entry.js → p-a2b29846.entry.js} +1 -1
- package/lib/duet/{p-0f144788.entry.js → p-a903df4e.entry.js} +1 -1
- package/lib/duet/{p-c4b6bf46.entry.js → p-a93fca8b.entry.js} +1 -1
- package/lib/duet/{p-2d58c660.system.entry.js → p-b263653d.system.entry.js} +1 -1
- package/lib/duet/{p-43c1dcf5.entry.js → p-b2680be5.entry.js} +1 -1
- package/lib/duet/{p-3f1e781d.system.entry.js → p-b34d417d.system.entry.js} +1 -1
- package/lib/duet/{p-2553a64a.entry.js → p-b5fc4eee.entry.js} +1 -1
- package/lib/duet/{p-c60f00e7.system.entry.js → p-b98bb109.system.entry.js} +1 -1
- package/lib/duet/{p-f2dab640.system.entry.js → p-bdbb5c7d.system.entry.js} +1 -1
- package/lib/duet/{p-1a8dfe6e.system.entry.js → p-bf0efbe9.system.entry.js} +1 -1
- package/lib/duet/{p-9027d0a4.system.entry.js → p-c2fe4072.system.entry.js} +1 -1
- package/lib/duet/{p-c9f704c9.entry.js → p-c5bd7c30.entry.js} +1 -1
- package/lib/duet/{p-7dfe1c16.entry.js → p-c83e1e74.entry.js} +1 -1
- package/lib/duet/{p-6dd1cf98.entry.js → p-c90ab5d7.entry.js} +1 -1
- package/lib/duet/{p-3f50d9bd.system.entry.js → p-c9453dc6.system.entry.js} +1 -1
- package/lib/duet/{p-56ae348b.entry.js → p-c993f95a.entry.js} +1 -1
- package/lib/duet/p-cb64979e.system.entry.js +4 -0
- package/lib/duet/{p-20f4d5d2.system.entry.js → p-cbd51090.system.entry.js} +1 -1
- package/lib/duet/{p-c069f560.entry.js → p-cd8b61fd.entry.js} +1 -1
- package/lib/duet/{p-100b6a91.entry.js → p-ce8ddf05.entry.js} +1 -1
- package/lib/duet/{p-fdaaa3ad.entry.js → p-d243054f.entry.js} +1 -1
- package/lib/duet/{p-8b7adbf6.system.entry.js → p-da59200a.system.entry.js} +1 -1
- package/lib/duet/{p-e00170a2.system.entry.js → p-da62b929.system.entry.js} +1 -1
- package/lib/duet/{p-e908bfdc.system.entry.js → p-da9aa2cc.system.entry.js} +1 -1
- package/lib/duet/p-de3c0f4d.js +4 -0
- package/lib/duet/{p-5184e972.system.entry.js → p-e15ae3b1.system.entry.js} +1 -1
- package/lib/duet/{p-4dcbaccf.system.entry.js → p-e2628b7c.system.entry.js} +1 -1
- package/lib/duet/{p-f301004d.entry.js → p-e74db103.entry.js} +1 -1
- package/lib/duet/{p-815f4a10.system.entry.js → p-ea4e6d02.system.entry.js} +1 -1
- package/lib/duet/{p-7382c47e.system.entry.js → p-ec34f321.system.entry.js} +1 -1
- package/lib/duet/{p-85c68d48.system.entry.js → p-ec96f020.system.entry.js} +1 -1
- package/lib/duet/{p-36924c8f.entry.js → p-ed9cc88f.entry.js} +1 -1
- package/lib/duet/{p-4260e8b5.system.entry.js → p-efcc198f.system.entry.js} +1 -1
- package/lib/duet/{p-083e39cc.entry.js → p-f2aeef65.entry.js} +1 -1
- package/lib/duet/{p-923b03a6.system.entry.js → p-f3e72c0f.system.entry.js} +1 -1
- package/lib/duet/{p-cdba4c82.entry.js → p-f63f1511.entry.js} +1 -1
- package/lib/duet/{p-acaedb00.system.js → p-f86937f0.system.js} +1 -1
- package/lib/duet/{p-634fda0f.entry.js → p-fd7f32f7.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +24 -6
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm/duet-button_2.entry.js +2 -2
- package/lib/esm/duet-caption_4.entry.js +2 -2
- package/lib/esm/duet-card.entry.js +2 -2
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -2
- package/lib/esm/duet-collapsible.entry.js +2 -2
- package/lib/esm/duet-combobox.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table_3.entry.js +1 -1
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +1 -1
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +1 -1
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +2 -2
- package/lib/esm/duet-input_2.entry.js +21 -4
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +1 -1
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +1 -1
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +2 -2
- package/lib/esm/{focus-utils-07c543df.js → focus-utils-4ca66786.js} +1 -1
- package/lib/esm/{index-bcca1cb8.js → index-d5956898.js} +1 -1
- package/lib/esm/loader.js +2 -2
- package/lib/esm/{token-utils-1f9435bc.js → token-utils-df78f4d8.js} +1 -1
- package/lib/esm-es5/duet-action-button.entry.js +2 -2
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +1 -1
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +2 -2
- package/lib/esm-es5/duet-combobox.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_3.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-pagination_2.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +1 -1
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +2 -2
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-07c543df.js → focus-utils-4ca66786.js} +1 -1
- package/lib/esm-es5/{index-bcca1cb8.js → index-d5956898.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/esm-es5/token-utils-df78f4d8.js +4 -0
- package/lib/types/components/duet-action-button/duet-action-button.d.ts +12 -4
- package/lib/types/components/duet-input/duet-input.d.ts +2 -1
- package/lib/types/components/duet-upload/duet-upload.d.ts +1 -2
- package/lib/types/components.d.ts +13 -5
- package/lib/types/utils/token-utils.d.ts +1 -0
- package/package.json +5 -5
- package/lib/duet/p-35159c88.system.entry.js +0 -4
- package/lib/duet/p-61507bc8.entry.js +0 -4
- package/lib/duet/p-6190e2d6.system.js +0 -4
- package/lib/duet/p-661f842b.entry.js +0 -4
- package/lib/duet/p-9cca0bb4.js +0 -4
- package/lib/duet/p-9df4bfa0.system.entry.js +0 -4
- package/lib/duet/p-dbb2579c.entry.js +0 -4
- package/lib/esm-es5/token-utils-1f9435bc.js +0 -4
|
@@ -79,13 +79,17 @@ export namespace Components {
|
|
|
79
79
|
*/
|
|
80
80
|
"accessibleLabelledBy": string;
|
|
81
81
|
/**
|
|
82
|
-
* Default
|
|
82
|
+
* Default accessible labels
|
|
83
83
|
*/
|
|
84
84
|
"accessibleLabels": Record<string, string>;
|
|
85
85
|
/**
|
|
86
|
-
* Default
|
|
86
|
+
* Default accessible labels
|
|
87
87
|
*/
|
|
88
88
|
"accessibleLabelsDefaults": DuetLangObject;
|
|
89
|
+
/**
|
|
90
|
+
* Title of the action button (shows as DOM tooltip when hovering) if set to true, this will try to add a best-guess title based on action-name if set to a string the string is used if set to false nothing is set
|
|
91
|
+
*/
|
|
92
|
+
"accessibleTitle": string | boolean;
|
|
89
93
|
/**
|
|
90
94
|
* Name of id of action that was called being called
|
|
91
95
|
*/
|
|
@@ -3821,13 +3825,17 @@ declare namespace LocalJSX {
|
|
|
3821
3825
|
*/
|
|
3822
3826
|
"accessibleLabelledBy"?: string;
|
|
3823
3827
|
/**
|
|
3824
|
-
* Default
|
|
3828
|
+
* Default accessible labels
|
|
3825
3829
|
*/
|
|
3826
3830
|
"accessibleLabels"?: Record<string, string>;
|
|
3827
3831
|
/**
|
|
3828
|
-
* Default
|
|
3832
|
+
* Default accessible labels
|
|
3829
3833
|
*/
|
|
3830
3834
|
"accessibleLabelsDefaults"?: DuetLangObject;
|
|
3835
|
+
/**
|
|
3836
|
+
* Title of the action button (shows as DOM tooltip when hovering) if set to true, this will try to add a best-guess title based on action-name if set to a string the string is used if set to false nothing is set
|
|
3837
|
+
*/
|
|
3838
|
+
"accessibleTitle"?: string | boolean;
|
|
3831
3839
|
/**
|
|
3832
3840
|
* Name of id of action that was called being called
|
|
3833
3841
|
*/
|
|
@@ -3865,7 +3873,7 @@ declare namespace LocalJSX {
|
|
|
3865
3873
|
*/
|
|
3866
3874
|
"iconSize"?: DuetActionButtonIconSize;
|
|
3867
3875
|
/**
|
|
3868
|
-
* Emitted
|
|
3876
|
+
* Emitted when an action has been invoked
|
|
3869
3877
|
*/
|
|
3870
3878
|
"onDuetActionEvent"?: (event: DuetActionButtonCustomEvent<DuetActionButtonEvent>) => void;
|
|
3871
3879
|
/**
|
|
@@ -4,6 +4,7 @@ export declare function isDashCase(str: any): boolean;
|
|
|
4
4
|
export declare function capitalize(str?: string): string;
|
|
5
5
|
export declare function camelize(str?: string): string;
|
|
6
6
|
export declare function getTheme(theme?: DuetTheme): DuetTheme;
|
|
7
|
+
export declare function capitalizeFirstLetter(string: any): any;
|
|
7
8
|
export declare function getColorByName(name: string, theme?: DuetTheme): string | undefined;
|
|
8
9
|
export declare function convertToColorName(name?: string, theme?: DuetTheme): string;
|
|
9
10
|
export declare function getFontSizeByName(name: string): string | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duetds/components",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.4.0",
|
|
4
4
|
"description": "This package includes Duet Design System Web Components and related utilities.",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"email": "duetdesignsystem@lahitapiola.fi"
|
|
@@ -50,11 +50,11 @@
|
|
|
50
50
|
"body-scroll-lock": "3.1.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@duetds/fonts": "1.4.
|
|
54
|
-
"@duetds/icons": "2.
|
|
53
|
+
"@duetds/fonts": "1.4.42",
|
|
54
|
+
"@duetds/icons": "2.5.0",
|
|
55
55
|
"@duetds/stencil-angular-output-target": "0.0.2",
|
|
56
56
|
"@duetds/stencil-react-output-target": "0.0.10",
|
|
57
|
-
"@duetds/tokens": "2.
|
|
57
|
+
"@duetds/tokens": "2.6.0",
|
|
58
58
|
"@koa/cors": "3.3.0",
|
|
59
59
|
"@rollup/plugin-replace": "3.1.0",
|
|
60
60
|
"@stencil/core": "2.16.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"collection": "lib/collection/collection-manifest.json",
|
|
86
86
|
"es2015": "lib/esm/index.js",
|
|
87
87
|
"es2017": "lib/esm/index.js",
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "33b2e4cbba17e0321d007954058c9968e513d9e6"
|
|
89
89
|
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,o){function i(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function r(t){try{s(o.next(t))}catch(e){a(e)}}function c(t){try{s(o["throw"](t))}catch(e){a(e)}}function s(t){t.done?n(t.value):i(t.value).then(r,c)}s((o=o.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,r;return r={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function c(t){return function(e){return s([t,e])}}function s(r){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,i&&(a=r[0]&2?i["return"]:r[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,r[1])).done)return a;if(i=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;i=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=e.call(t,n)}catch(c){r=[6,c];i=0}finally{o=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};
|
|
2
|
-
/*!
|
|
3
|
-
* Built with Duet Design System
|
|
4
|
-
*/System.register(["./p-acaedb00.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-92639d0b.system.js","./p-a63f753e.system.js","./p-f69b64c9.system.js","./p-6190e2d6.system.js","./p-b6d51921.system.js","./p-18cc5627.system.js"],(function(t){"use strict";var e,n,o,i,a,r,c,s,u,d,l,b;return{setters:[function(t){e=t.r;n=t.c;o=t.h;i=t.H;a=t.g},function(t){r=t.i},function(t){c=t.c},function(t){s=t.d},function(t){u=t.i},function(t){d=t.g},function(t){l=t.g;b=t.s},function(){},function(){}],execute:function(){var h="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}button.duet-action-button{white-space:nowrap}button.duet-action-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva button.duet-action-button{color:#171c3a;background:#f5f5f7}button.duet-action-button duet-icon{display:block}@media (max-width: 35.9375em){button.duet-action-button{width:32px;height:32px}}button.duet-action-button:not(:disabled):hover{background:#e9ecee}.duet-theme-turva button.duet-action-button:not(:disabled):hover{background:#e9e9eb}button.duet-action-button:focus{outline:0;box-shadow:0 0 0 2px #0077b3 !important}.duet-theme-turva button.duet-action-button:focus{box-shadow:0 0 0 2px #171c3a !important}button.duet-action-button:active:focus{background:#dddfe1 !important;box-shadow:none}.duet-theme-turva button.duet-action-button:active:focus{background:#ddddde !important}button.duet-action-button:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva button.duet-action-button:disabled{color:#747475;background:#f5f5f7}";var f=t("duet_action_button",function(){function t(t){var o=this;e(this,t);this.duetActionEvent=n(this,"duetActionEvent",6);this.numbersStore="";this.theme="";this.iconName="action-arrow-left-small";this.iconColor="currentColor";this.iconSize="xx-small";this.actionName="default-action";this.actionId=undefined;this.actionMeta=undefined;this.disabled=false;this.color="";this.background="";this.accessibleDescribedBy=undefined;this.accessibleDetails=undefined;this.accessibleLabelledBy=undefined;this.accessibleDescription=undefined;this.accessibleLabelsDefaults={en:{label:"Click to activate action"},fi:{label:"Klikkaa toiminnon aktivointiin"},sv:{label:"Klicka för att aktivera åtgärd"}};this.accessibleLabels=d(this.accessibleLabelsDefaults);this.accessibleControls="";this.listId=c("duet-action-button");this.emitPageEvent=s((function(t){o.duetActionEvent.emit({component:"duet-action-button",originalEvent:t,action:o.actionId,name:o.actionName,meta:o.actionMeta,id:o.listId})}))}t.prototype.onKeyboardDown=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(u(t)){this.emitPageEvent(t)}return[2]}))}))};t.prototype.onMouseHandler=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){t.preventDefault();this.duetActionEvent.emit({component:"duet-action-button",originalEvent:t,action:this.actionName,id:this.actionId,meta:this.actionMeta});return[2]}))}))};t.prototype.componentWillLoad=function(){r(this)};t.prototype.render=function(){var t;var e=this;var n=this.color==="currentColor"?"currentColor":l(this.color,this.theme);var a=l(this.background,this.theme);var r=a?b(a,-.1):a;var c=a?"\n button.duet-action-button {\n background: ".concat(a," !important;\n }\n button.duet-action-button:not(:disabled):hover {\n background: ").concat(r," !important;\n }\n "):"";var s={color:n,"border-color":l(this.iconColor,this.theme),"border-width":"1px","border-style":"solid"};return o(i,{onKeyDown:function(t){return e.onKeyboardDown(t)}},o("style",{innerHTML:c}),o("button",{part:"button",style:s,disabled:this.disabled,id:this.listId,class:(t={"duet-action-button":true,"duet-action-button--disabled":this.disabled},t["duet-action-button--".concat(this.theme)]=this.theme!=="",t),type:"button",onClick:function(t){return e.onMouseHandler(t)},"aria-label":this.accessibleLabels.label,"aria-labelledby":this.accessibleLabelledBy,"aria-description":this.accessibleDescription,"aria-describedby":this.accessibleDescribedBy,"aria-details":this.accessibleDetails,"aria-controls":this.accessibleControls},o("duet-icon",{part:"icon",name:this.iconName,color:this.iconColor,margin:"none",size:this.iconSize}),o("duet-visually-hidden",null,o("slot",null))))};Object.defineProperty(t.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return t}());f.style=h}}}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as o,h as i,H as n,g as a}from"./p-bacb27a1.js";import{i as e}from"./p-4ebf1618.js";import{c as r}from"./p-c1325e35.js";import{d as s}from"./p-dbb4a588.js";import{i as d}from"./p-54f35a79.js";import{g as u}from"./p-ede854e1.js";import{g as c,s as b}from"./p-9cca0bb4.js";import"./p-5a9d75e1.js";import"./p-398a79a0.js";const h=class{constructor(i){t(this,i),this.duetActionEvent=o(this,"duetActionEvent",6),this.numbersStore="",this.theme="",this.iconName="action-arrow-left-small",this.iconColor="currentColor",this.iconSize="xx-small",this.actionName="default-action",this.actionId=void 0,this.actionMeta=void 0,this.disabled=!1,this.color="",this.background="",this.accessibleDescribedBy=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.accessibleLabelsDefaults={en:{label:"Click to activate action"},fi:{label:"Klikkaa toiminnon aktivointiin"},sv:{label:"Klicka för att aktivera åtgärd"}},this.accessibleLabels=u(this.accessibleLabelsDefaults),this.accessibleControls="",this.listId=r("duet-action-button"),this.emitPageEvent=s((t=>{this.duetActionEvent.emit({component:"duet-action-button",originalEvent:t,action:this.actionId,name:this.actionName,meta:this.actionMeta,id:this.listId})}))}async onKeyboardDown(t){d(t)&&this.emitPageEvent(t)}async onMouseHandler(t){t.preventDefault(),this.duetActionEvent.emit({component:"duet-action-button",originalEvent:t,action:this.actionName,id:this.actionId,meta:this.actionMeta})}componentWillLoad(){e(this)}render(){const t="currentColor"===this.color?"currentColor":c(this.color,this.theme),o=c(this.background,this.theme),a=o?b(o,-.1):o,e=o?`\n button.duet-action-button {\n background: ${o} !important;\n }\n button.duet-action-button:not(:disabled):hover {\n background: ${a} !important;\n }\n `:"",r={color:t,"border-color":c(this.iconColor,this.theme),"border-width":"1px","border-style":"solid"};return i(n,{onKeyDown:t=>this.onKeyboardDown(t)},i("style",{innerHTML:e}),i("button",{part:"button",style:r,disabled:this.disabled,id:this.listId,class:{"duet-action-button":!0,"duet-action-button--disabled":this.disabled,[`duet-action-button--${this.theme}`]:""!==this.theme},type:"button",onClick:t=>this.onMouseHandler(t),"aria-label":this.accessibleLabels.label,"aria-labelledby":this.accessibleLabelledBy,"aria-description":this.accessibleDescription,"aria-describedby":this.accessibleDescribedBy,"aria-details":this.accessibleDetails,"aria-controls":this.accessibleControls},i("duet-icon",{part:"icon",name:this.iconName,color:this.iconColor,margin:"none",size:this.iconSize}),i("duet-visually-hidden",null,i("slot",null))))}get element(){return a(this)}};h.style="*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:inline-block;margin:0 auto}button.duet-action-button{white-space:nowrap}button.duet-action-button{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-height:auto !important;padding:0 !important;margin:0 0 0 8px !important;color:#00294d;cursor:pointer;background:#f5f8fa;border-radius:50%;transition:background-color 300ms ease !important}.duet-theme-turva button.duet-action-button{color:#171c3a;background:#f5f5f7}button.duet-action-button duet-icon{display:block}@media (max-width: 35.9375em){button.duet-action-button{width:32px;height:32px}}button.duet-action-button:not(:disabled):hover{background:#e9ecee}.duet-theme-turva button.duet-action-button:not(:disabled):hover{background:#e9e9eb}button.duet-action-button:focus{outline:0;box-shadow:0 0 0 2px #0077b3 !important}.duet-theme-turva button.duet-action-button:focus{box-shadow:0 0 0 2px #171c3a !important}button.duet-action-button:active:focus{background:#dddfe1 !important;box-shadow:none}.duet-theme-turva button.duet-action-button:active:focus{background:#ddddde !important}button.duet-action-button:disabled{color:#909599;cursor:default;background:#f5f8fa;opacity:0.75}.duet-theme-turva button.duet-action-button:disabled{color:#747475;background:#f5f5f7}";export{h as duet_action_button}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
System.register(["./p-18cc5627.system.js"],(function(n){"use strict";var t;return{setters:[function(n){t=n.t}],execute:function(){n({g:d,s:p});var r=["turva"];function i(n){var t=n.includes("-");var r=n.includes(" ")||n.includes("_");var i=n.charAt(0)==="-";return t&&!r&&!i}function c(n){if(n===void 0){n=""}return"".concat(n.charAt(0).toUpperCase()).concat(n.slice(1))}function e(n){if(n===void 0){n=""}return"".concat(n.charAt(0).toLowerCase()).concat(n.slice(1))}function o(n){if(n===void 0){n=""}var t=n.split("-");t.forEach((function(n,r){t[r]=c(n)}));return t.join("")}function u(n){if(n===void 0){n=""}if(r.includes(n.toLowerCase())){return n.toLowerCase()}return""}function a(n){return n.charAt(0).toUpperCase()+n.slice(1)}function f(n,t){if(t===void 0){t=""}return t.indexOf(a(n))===0||t.indexOf(n)===0}function s(n,t){if(t===void 0){t=""}if(t&&!i(t)&&!f(n,t)){return"".concat(n).concat(c(t))}return t}function v(n,t){var r=u(t).length;if(r&&n.indexOf(t)===-1){return"".concat(n).concat(c(t))}return n}function d(n,r){if(r===void 0){r=""}if(!n){return undefined}var i=l(n);var c=l(n,r);var e=t[c];if(!e){e=t[i]}return e}function l(n,t){if(n===void 0){n=""}if(t===void 0){t=""}var r=n;var c=i(n);if(c){r=o(r)}r=s("color",r);r=v(r,t);r=e(r);return r}function p(n,t){var r=n.split(","),i=t<0?0:255,c=t<0?t*-1:t;var e=parseInt(r[0].slice(4)),o=parseInt(r[1]),u=parseInt(r[2]);e=Math.round((i-e)*c)+e;o=Math.round((i-o)*c)+o;u=Math.round((i-u)*c)+u;e=e<0?0:e;e=e>255?255:e;o=o<0?0:o;o=o>255?255:o;u=u<0?0:u;u=u>255?255:u;return"rgb(".concat(e,",").concat(o,",").concat(u,")")}}}}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as i,h as e,H as n,g as o}from"./p-bacb27a1.js";import{f as u}from"./p-d004da5f.js";import{i as s}from"./p-4ebf1618.js";import{c as a}from"./p-c1325e35.js";import{c as p,r}from"./p-56118313.js";import{f as d}from"./p-54f35a79.js";import{g as l}from"./p-ede854e1.js";import"./p-5a9d75e1.js";const c={search:u,email:{title:"form-email",tags:"form email",svg:'<svg fill="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" role="img"><path d="M12 23.999c-3.205 0-6.218-1.248-8.484-3.514S.001 15.206.001 12.001s1.248-6.218 3.514-8.485C5.782 1.25 8.795.001 12 .001s6.218 1.248 8.485 3.514A11.92 11.92 0 0 1 24 12v2.25A3.754 3.754 0 0 1 20.25 18a3.77 3.77 0 0 1-3.48-2.365A6.009 6.009 0 0 1 12 18c-3.308 0-6-2.692-6-6s2.692-6 6-6 6 2.692 6 6v2.25c0 1.241 1.009 2.25 2.25 2.25s2.25-1.009 2.25-2.25V12c0-2.804-1.092-5.441-3.075-7.424A10.433 10.433 0 0 0 12 1.501c-2.804 0-5.441 1.092-7.424 3.075S1.501 9.196 1.501 12c0 2.805 1.092 5.441 3.075 7.424s4.619 3.074 7.423 3.074c2.257 0 4.494-.746 6.299-2.1a.749.749 0 1 1 .9 1.199A12.049 12.049 0 0 1 12 23.999zM12 7.5c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5 4.5-2.019 4.5-4.5-2.019-4.5-4.5-4.5z"/></svg>'}},h=class{constructor(e){t(this,e),this.duetInput=i(this,"duetInput",7),this.duetChange=i(this,"duetChange",3),this.duetBlur=i(this,"duetBlur",7),this.duetClear=i(this,"duetClear",7),this.duetFocus=i(this,"duetFocus",7),this.inputId=a("DuetInput"),this.clearId=a("DuetInputClear"),this.labelId=a("DuetLabel"),this.topCaptionId=a("DuetCaptionTop"),this.topCaptionPlaceholderId=a("DuetCaptionPlaceholderTop"),this.errorId=a("DuetError"),this.disallowPatternRegex=null,this.clearLabel=l({en:"Clear",fi:"Tyhjennä",sv:"Rensa"}),this.accessibleDescribedBy="",this.accessibleHasPopup=void 0,this.accessibleDetails=void 0,this.accessibleLabelledBy=void 0,this.accessibleDescription=void 0,this.debounce=0,this.clear=!1,this.echoPlaceholder=!1,this.theme="",this.expand=!1,this.disabled=!1,this.margin="auto",this.required=!1,this.type="text",this.variation="default",this.label="label",this.error="",this.labelHidden=!1,this.numericKeyboard=!1,this.component="input",this.autoComplete="on",this.disallowPattern=null,this.tooltip="",this.tooltipDirection="auto",this.onInput=t=>{this.disallowPatternRegex&&p(this.nativeInput,this.disallowPatternRegex),this.value=this.nativeInput.value||"",this.duetInput.emit({originalEvent:t,value:this.value,component:"duet-input"})},this.onBlur=t=>{this.duetBlur.emit({originalEvent:t,value:this.value,component:"duet-input"})},this.onFocus=t=>{this.duetFocus.emit({originalEvent:t,value:this.value,component:"duet-input"})},this.onClear=t=>{this.duetFocus.emit({originalEvent:t,value:this.value,component:"duet-input"})},this.getDescribedBy=()=>{let t="";return this.isCaptionVisible&&this.topCaptionId?(t=this.topCaptionId,this.accessibleDescribedBy&&(t+=" "+this.accessibleDescribedBy)):t=this.accessibleDescribedBy.length>0?this.accessibleDescribedBy:void 0,t},this.handleClearClick=t=>{const i=this.clearInput();return this.onClear(t),i},this.keyHandler=t=>(d(t)&&this.clear&&this.handleClearClick(t),t)}disallowedPatternChange(){this.disallowPatternRegex=this.disallowPattern?new RegExp(this.disallowPattern,"g"):null}valueChanged(){var t;if((null===(t=null==this?void 0:this.nativeInput)||void 0===t?void 0:t.value)!==this.value){const t=r(this.nativeInput);this.nativeInput.value=this.value,t()}this.isCaptionVisible=!!this.caption;const i=()=>this.duetChange.emit({value:this.value,component:"duet-input"});0===this.debounce?i():(clearTimeout(this.timeoutId),this.timeoutId=setTimeout(i,this.debounce))}componentWillLoad(){s(this),this.disallowedPatternChange(),this.isCaptionVisible=!!this.caption}async setFocus(t){this.nativeInput&&this.nativeInput.focus(t)}async resetCursor(){if(this.nativeInput){const t=r(this.nativeInput);this.nativeInput.value=this.value,t()}}async clearInput(){this.nativeInput&&(this.nativeInput.value="",this.value="")}render(){const t=this.identifier||this.inputId,i={};return this.numericKeyboard&&(i.inputmode="numeric"),this.pattern&&"tel"!==this.type?i.pattern=this.pattern:this.pattern||"tel"!==this.type||(i.pattern="[0-9+ ]+"),e(n,{class:{"duet-expand":this.expand,"duet-m-0":"none"===this.margin},onKeyUp:t=>this.keyHandler(t)},e("div",{class:{"duet-input-container":!0,"duet-theme-turva":"turva"===this.theme,[`duet-input-variation-${this.variation}`]:!0,"duet-label-hidden":this.labelHidden,"duet-input-top-caption-shown":this.isCaptionVisible,"has-icon":!!this.icon||"text"!==this.type&&"tel"!==this.type&&"password"!==this.type,"has-error":!!this.error,"has-clear":this.clear}},e("duet-label",{theme:"turva"===this.theme?"turva":"default",class:{"duet-has-tooltip":!!this.tooltip},margin:this.isCaptionVisible?"small":"auto",id:this.labelId,for:t},this.label),this.tooltip&&e("duet-tooltip",{direction:this.tooltipDirection,accessibleInputLabel:this.label},this.tooltip),this.caption&&e("duet-caption",{id:this.topCaptionId,size:"medium"},this.caption),e("div",{class:"duet-input-relative"},this.placeholder&&this.echoPlaceholder&&this.value&&e("duet-caption",{id:this.topCaptionPlaceholderId,class:"duet-input-placeholder",margin:"none",size:"small"},this.placeholder),e("input",Object.assign({ref:t=>this.nativeInput=t,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,type:this.type,class:{"duet-input":!0,disabled:this.disabled,"is-number":"number"===this.component,"is-date":"date"===this.component},value:this.value,disabled:this.disabled,"aria-invalid":this.error?"true":"false","aria-labelledby":this.accessibleLabelledBy?`${this.labelId} ${this.errorId} ${this.accessibleLabelledBy}`:`${this.labelId} ${this.errorId}`,"aria-controls":this.accessibleControls,"aria-autocomplete":this.accessibleAutocomplete,"aria-activedescendant":this.accessibleActiveDescendant,"aria-details":this.accessibleDetails,"aria-description":this.accessibleDescription,"aria-expanded":this.accessibleExpanded,"aria-haspopup":this.accessibleHasPopup,"aria-owns":this.accessibleOwns,"aria-describedby":this.getDescribedBy(),placeholder:this.placeholder,spellcheck:"false",minlength:this.minlength,maxlength:this.maxlength,autocomplete:this.autoComplete,required:this.required,role:this.role,name:this.name,id:t},i)),!this.icon&&"text"!==this.type&&"tel"!==this.type&&"password"!==this.type&&"button"!==this.variation&&e("div",{class:"duet-input-icon"},e("duet-icon",{margin:"none",size:"small",icon:c[this.type].svg,color:"currentColor"})),this.clear&&this.value&&e("div",{class:"duet-input-clear-icon"},e("button",{onClick:this.handleClearClick,id:this.clearId,"aria-label":this.clearLabel,"aria-keyshortcuts":"Escape"},e("duet-icon",{margin:"none",size:"xx-small",name:"activity-close",color:"currentColor"}))),this.icon&&"button"!==this.variation&&e("div",{class:"duet-input-icon"},e("duet-icon",{margin:"none",size:"small",name:this.icon,color:"currentColor"})),"button"===this.variation&&e("slot",{name:"button"}),e("slot",null)),e("span",{class:"duet-input-help",id:this.errorId,"aria-live":"assertive","aria-relevant":"additions removals"},this.error&&e("span",{class:"duet-input-error"},this.error))))}get element(){return o(this)}static get watchers(){return{disallowPattern:["disallowedPatternChange"],value:["valueChanged"]}}};h.style='*.sc-duet-input,*.sc-duet-input::after,*.sc-duet-input::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-input-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-right:16px !important;margin-bottom:12px !important;display:inline-flex;width:100%;min-width:calc(33.333% - 8px);max-width:100%;text-align:left;vertical-align:bottom}.sc-duet-input-h:last-child,.sc-duet-input-h:last-of-type{margin-right:0 !important}@media (min-width: 36em){.sc-duet-input-h{width:calc(50% - 16px - 3px)}}.duet-expand.sc-duet-input-h{width:100% !important}.duet-m-0.sc-duet-input-h{margin:0 !important}duet-tooltip.sc-duet-input{position:absolute;top:12px;right:0}@media (min-width: 48em){duet-tooltip.sc-duet-input{position:relative;top:4px;right:auto}}duet-caption.sc-duet-input:not(:last-of-type){margin-bottom:0}.duet-input-placeholder.sc-duet-input{position:absolute;top:-9px;left:9px;z-index:200;display:block;width:auto;max-width:60%;padding:0 0.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:white}.duet-input-icon.sc-duet-input{position:absolute;top:50%;right:16px;z-index:200;width:20px;height:20px;font-size:0;line-height:normal;color:#00294d;pointer-events:none;transform:translateY(-50%)}.duet-theme-turva.sc-duet-input .duet-input-icon.sc-duet-input{color:#171c3a}.duet-input-container.sc-duet-input{position:relative;width:100%;height:100%}.duet-input-container.has-clear.sc-duet-input .duet-input-clear-icon.sc-duet-input{position:relative;z-index:250}.duet-input-container.has-clear.sc-duet-input .duet-input-clear-icon.sc-duet-input button.sc-duet-input{position:absolute;top:-24px;right:0;min-width:48px;min-height:48px}.duet-input-container.has-clear.sc-duet-input .duet-input-clear-icon.sc-duet-input button.sc-duet-input:focus{outline:0;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}.duet-theme-turva.sc-duet-input .duet-input-container.has-clear.sc-duet-input .duet-input-clear-icon.sc-duet-input button.sc-duet-input:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-input-container.has-clear.sc-duet-input .duet-input-clear-icon.sc-duet-input button.sc-duet-input:active{opacity:0.75;transition:none}.duet-input-container.has-clear.has-icon.sc-duet-input .duet-input-clear-icon.sc-duet-input{top:-24px;right:24px}.duet-input.sc-duet-input{position:relative;z-index:100;display:block !important;width:100% !important;min-width:8rem;max-width:initial !important;height:auto !important;padding:12px 14px !important;margin:initial !important;margin-bottom:initial !important;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400 !important;font-variant-numeric:tabular-nums;line-height:1.5 !important;color:#00294d !important;cursor:initial !important;background:white !important;background-clip:initial !important;border:1px solid #909599 !important;border-radius:4px !important;box-shadow:initial !important;transition:box-shadow 150ms ease, border 150ms ease !important}.duet-input.is-number.sc-duet-input{padding-right:112px !important}.duet-input.is-date.sc-duet-input{padding-right:64px !important}.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#de2362 !important}.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#de2362 !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input{border-color:#e02a0d !important}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input+.duet-input-icon.sc-duet-input{color:#e02a0d !important}.has-icon.sc-duet-input .duet-input.sc-duet-input{padding-right:48px !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a !important;border-color:#747475 !important}.duet-input.sc-duet-input::-ms-clear{display:none}.duet-input.sc-duet-input::-webkit-contacts-auto-fill-button{display:none !important}.duet-input.sc-duet-input::-webkit-input-placeholder{color:#657787;opacity:1 !important;transition:color 300ms ease}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-webkit-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-webkit-input-placeholder{color:#cfcfd1}.duet-input.sc-duet-input::-moz-placeholder{color:#657787;opacity:1 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input::-moz-placeholder{color:#747475}.duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus::-moz-placeholder{color:#cfcfd1}.duet-input.sc-duet-input:-ms-input-placeholder{color:#657787}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:-ms-input-placeholder{color:#747475}.duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfd2d4}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus:-ms-input-placeholder{color:#cfcfd1}.duet-input[disabled].sc-duet-input{color:#00294d !important;cursor:text !important;background:#f5f8fa !important;border-color:#f5f8fa !important;box-shadow:none !important;opacity:1 !important;-webkit-text-fill-color:#00294d !important}.duet-theme-turva.sc-duet-input .duet-input[disabled].sc-duet-input{color:#171c3a !important;background:#f5f5f7 !important;border-color:#f5f5f7 !important;-webkit-text-fill-color:#171c3a !important}.duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #909599 !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #747475 !important}.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:hover:not(:disabled){box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus{border-color:#0077b3 !important;outline:0;box-shadow:0 0 0 1px #0077b3 !important;transition:none}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus{border-color:#171c3a !important;box-shadow:0 0 0 1px #171c3a !important}.duet-theme-turva.sc-duet-input .duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#171c3a}.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input.sc-duet-input:focus{box-shadow:0 0 0 1px #e02a0d}.duet-input.sc-duet-input:focus+.duet-input-icon.sc-duet-input{color:#0077b3}.duet-input[type=search].sc-duet-input:not(:placeholder-shown):focus+.duet-input-icon.sc-duet-input{display:none}.duet-input.sc-duet-input:not(:focus):not(:hover):invalid{box-shadow:none !important}.duet-input[type=number].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=number].sc-duet-input::-webkit-outer-spin-button,.duet-input[type=time].sc-duet-input::-webkit-inner-spin-button,.duet-input[type=time].sc-duet-input::-webkit-outer-spin-button{display:none;margin:0;-webkit-appearance:none}.duet-input.sc-duet-input::-webkit-search-cancel-button{margin-right:-28px}.duet-input-help.sc-duet-input{display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:0.875rem;font-weight:400;line-height:1.25;color:#657787;border-radius:4px}.duet-input-help.sc-duet-input span.sc-duet-input{display:block;margin-top:8px}.duet-theme-turva.sc-duet-input .duet-input-help.sc-duet-input{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#747475}.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#de2362}.duet-theme-turva.has-error.sc-duet-input .duet-input-help.sc-duet-input{color:#e02a0d}.duet-label-hidden.sc-duet-input duet-label.sc-duet-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);border:0}.duet-input-relative.sc-duet-input{position:relative;width:100%}.duet-input-variation-button.sc-duet-input{position:relative;width:100%}.duet-input-variation-button.sc-duet-input .duet-input-relative.sc-duet-input{display:flex;flex-direction:row;flex-wrap:nowrap;align-content:center;align-items:center;justify-content:flex-start;width:auto}.duet-input-variation-button.sc-duet-input .duet-input-relative.sc-duet-input duet-button.sc-duet-input{z-index:250;margin-bottom:0}.duet-input-variation-button.sc-duet-input .duet-input-relative.sc-duet-input .duet-input.sc-duet-input{border-right-width:0 !important;border-top-right-radius:0 !important;border-bottom-right-radius:0 !important}';const m=class{constructor(i){t(this,i),this.theme="",this.margin="auto",this.size="medium"}componentWillLoad(){s(this)}render(){return e(n,{class:{"duet-label":!0,"duet-label-small":"small"===this.size,"duet-theme-turva":"turva"===this.theme,"duet-small-margin":"small"===this.margin,"duet-m-0":"none"===this.margin}},e("label",{htmlFor:this.for},e("span",null,e("slot",null))))}};m.style='*.sc-duet-label,*.sc-duet-label::after,*.sc-duet-label::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}.sc-duet-label-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:12px !important;position:relative;z-index:100;display:inline-flex;width:auto;margin-top:8px !important;line-height:1.25;cursor:default}.duet-p-0.sc-duet-label-h{padding:0 !important}.duet-m-0.sc-duet-label-h{margin:0 !important}.duet-m-0.sc-duet-label-h{margin-bottom:0 !important}.duet-small-margin.sc-duet-label-h{margin-top:8px !important;margin-bottom:4px !important}.duet-has-tooltip.sc-duet-label-h{padding-right:48px}@media (min-width: 48em){.duet-has-tooltip.sc-duet-label-h{padding-right:0}}label.sc-duet-label{margin:0;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600 !important;line-height:1.25;color:#00294d;text-align:left;word-break:break-word}label.sc-duet-label span.sc-duet-label{font-size:1rem;font-weight:600 !important;word-break:break-word}.duet-label-small.sc-duet-label-h label.sc-duet-label{font-size:0.875rem}.duet-label-small.sc-duet-label-h label.sc-duet-label span.sc-duet-label{font-size:0.875rem}.duet-theme-turva.sc-duet-label-h label.sc-duet-label{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}';export{h as duet_input,m as duet_label}
|
package/lib/duet/p-9cca0bb4.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{t as n}from"./p-398a79a0.js";const t=["turva"];function r(n){const t=n.includes("-"),r=n.includes(" ")||n.includes("_"),u="-"===n.charAt(0);return t&&!r&&!u}function u(n=""){return`${n.charAt(0).toUpperCase()}${n.slice(1)}`}function o(t,r=""){if(!t)return;const u=e(t),o=e(t,r);let c=n[o];return c||(c=n[u]),c}function e(n="",o=""){let e=n;return r(n)&&(e=function(n=""){const t=n.split("-");return t.forEach(((n,r)=>{t[r]=u(n)})),t.join("")}(e)),e=function(n,t=""){return!t||r(t)||function(n,t=""){return 0===t.indexOf((r=n).charAt(0).toUpperCase()+r.slice(1))||0===t.indexOf(n);var r}(n,t)?t:`${n}${u(t)}`}("color",e),e=function(n,r){return function(n=""){return t.includes(n.toLowerCase())?n.toLowerCase():""}(r).length&&-1===n.indexOf(r)?`${n}${u(r)}`:n}(e,o),e=function(n=""){return`${n.charAt(0).toLowerCase()}${n.slice(1)}`}(e),e}function c(n,t){const r=n.split(","),u=t<0?0:255,o=t<0?-1*t:t;let e=parseInt(r[0].slice(4)),c=parseInt(r[1]),a=parseInt(r[2]);return e=Math.round((u-e)*o)+e,c=Math.round((u-c)*o)+c,a=Math.round((u-a)*o)+a,e=e<0?0:e,e=e>255?255:e,c=c<0?0:c,c=c>255?255:c,a=a<0?0:a,a=a>255?255:a,`rgb(${e},${c},${a})`}export{o as g,c as s}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,n,o){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function l(e){try{r(o.next(e))}catch(t){a(t)}}function s(e){try{r(o["throw"](e))}catch(t){a(t)}}function r(e){e.done?n(e.value):i(e.value).then(l,s)}r((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,i,a,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(t){return r([e,t])}}function r(l){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,i&&(a=l[0]&2?i["return"]:l[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;if(i=0,a)l=[l[0]&2,a.value];switch(l[0]){case 0:case 1:a=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;i=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1];a=l;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(l);break}if(a[2])n.ops.pop();n.trys.pop();continue}l=t.call(e,n)}catch(s){l=[6,s];i=0}finally{o=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};
|
|
2
|
-
/*!
|
|
3
|
-
* Built with Duet Design System
|
|
4
|
-
*/System.register(["./p-acaedb00.system.js","./p-0c4bbd65.system.js","./p-a93a04b9.system.js","./p-33b3aba4.system.js","./p-5f6bd5db.system.js","./p-a63f753e.system.js","./p-b6d51921.system.js"],(function(e){"use strict";var t,n,o,i,a,l,s,r,c,u,d,p;return{setters:[function(e){t=e.r;n=e.c;o=e.h;i=e.H;a=e.g},function(e){l=e.a},function(e){s=e.f;r=e.t},function(e){c=e.i},function(e){u=e.c},function(e){d=e.i},function(e){p=e.s}],execute:function(){var h='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d}:host(.duet-theme-turva){font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}:host(.duet-m-0){margin:0 !important}.duet-collapsible-content{display:none;padding-left:18px;margin-top:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}:host([open]) .duet-collapsible-content{display:block}.duet-collapsible-heading{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight{font-weight:400}.duet-collapsible-heading.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-collapsible-heading .duet-collapsible-heading-content{flex:1}.duet-collapsible-heading:focus{outline:0}:host(.user-is-tabbing) .duet-collapsible-heading:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva) .duet-collapsible-heading:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon:last-child,.duet-collapsible-heading-icon:last-of-type{margin-right:0 !important}[aria-expanded=true] .duet-collapsible-heading-icon{transform:rotate(180deg)}';var m=e("duet_collapsible",function(){function e(e){var o=this;t(this,e);this.duetToggle=n(this,"duetToggle",7);this.id=u("DuetCollapsible");this.theme="";this.heading="";this.headingWeight="semibold";this.headingSize=undefined;this.headingLevel=undefined;this.margin="auto";this.open=false;this.handleKeyDown=function(e){if(d(e)){o.handleClick(e)}};this.getFontSizeFromTokens=function(e){if(e===void 0){e=o.headingSize}if(!e){return s}else{var t=/-/g;var n=e.replace(t,"_");return r["font_size_".concat(n)]}};this.getEquivalentIconSize=function(e){if(e===void 0){e=o.headingSize}switch(e){case"x-small":return"xx-small";case"small":return"xx-small";case"medium":return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large";default:return"xx-small"}};this.handleClick=function(e){e.preventDefault();o.open=!o.open;o.duetToggle.emit({component:"duet-collapsible",originalEvent:e})}}e.prototype.componentWillLoad=function(){c(this)};e.prototype.setFocus=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){if(this.nativeButton){this.element.classList.add("user-is-tabbing");this.nativeButton.focus(e)}return[2]}))}))};e.prototype.render=function(){var e=this;var t=this.headingLevel?p(this.headingLevel):"div";return o(i,{class:{"duet-m-0":this.margin==="none"}},o(t,{class:{"duet-collapsible-heading":true,"duet-theme-turva":this.theme==="turva","duet-collapsible-normal-weight":this.headingWeight==="normal"},style:{"font-size":this.getFontSizeFromTokens()},role:"button",tabindex:"0",ref:function(t){return e.nativeButton=t},"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},o("div",{class:"duet-collapsible-heading-icon"},o("duet-icon",{margin:"none",color:this.theme==="turva"?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:l.svg})),o("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading)),o("div",{id:this.id,class:{"duet-collapsible-content":true,"duet-theme-turva":this.theme==="turva"},part:"duet-collapsible-content"},o("slot",null)))};Object.defineProperty(e.prototype,"element",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());m.style=h}}}));
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{r as e,c as t,h as o,H as a,g as i}from"./p-bacb27a1.js";import{a as s}from"./p-115c79b6.js";import{f as l,t as n}from"./p-d1746325.js";import{i as r}from"./p-4ebf1618.js";import{c}from"./p-c1325e35.js";import{i as p}from"./p-54f35a79.js";import{s as d}from"./p-5a9d75e1.js";const m=class{constructor(o){e(this,o),this.duetToggle=t(this,"duetToggle",7),this.id=c("DuetCollapsible"),this.theme="",this.heading="",this.headingWeight="semibold",this.headingSize=void 0,this.headingLevel=void 0,this.margin="auto",this.open=!1,this.handleKeyDown=e=>{p(e)&&this.handleClick(e)},this.getFontSizeFromTokens=(e=this.headingSize)=>{if(e){const t=e.replace(/-/g,"_");return n[`font_size_${t}`]}return l},this.getEquivalentIconSize=(e=this.headingSize)=>{switch(e){case"x-small":case"small":case"medium":return"xx-small";case"large":return"x-small";case"x-large":return"small";case"xx-large":return"medium";case"xxx-large":return"x-large";case"xxxx-large":return"xxx-large";default:return"xx-small"}},this.handleClick=e=>{e.preventDefault(),this.open=!this.open,this.duetToggle.emit({component:"duet-collapsible",originalEvent:e})}}componentWillLoad(){r(this)}async setFocus(e){this.nativeButton&&(this.element.classList.add("user-is-tabbing"),this.nativeButton.focus(e))}render(){const e=this.headingLevel?d(this.headingLevel):"div";return o(a,{class:{"duet-m-0":"none"===this.margin}},o(e,{class:{"duet-collapsible-heading":!0,"duet-theme-turva":"turva"===this.theme,"duet-collapsible-normal-weight":"normal"===this.headingWeight},style:{"font-size":this.getFontSizeFromTokens()},role:"button",tabindex:"0",ref:e=>this.nativeButton=e,"aria-expanded":this.open?"true":"false","aria-controls":this.id,onClick:this.handleClick,onKeyDown:this.handleKeyDown},o("div",{class:"duet-collapsible-heading-icon"},o("duet-icon",{margin:"none",color:"turva"===this.theme?"secondary-turva":"secondary",size:this.getEquivalentIconSize(),icon:s.svg})),o("div",{class:"duet-collapsible-heading-content",part:"duet-collapsible-heading-content"},this.heading)),o("div",{id:this.id,class:{"duet-collapsible-content":!0,"duet-theme-turva":"turva"===this.theme},part:"duet-collapsible-content"},o("slot",null)))}get element(){return i(this)}};m.style='*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;margin-bottom:16px !important;display:block;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d}:host(.duet-theme-turva){font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}:host(.duet-m-0){margin:0 !important}.duet-collapsible-content{display:none;padding-left:18px;margin-top:8px;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:400;font-variant-numeric:tabular-nums;-webkit-hyphens:auto;hyphens:auto;line-height:1.5;color:#00294d}@media (max-width: 35.9375em){.duet-collapsible-content{font-size:0.875rem}}.duet-collapsible-content.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}:host([open]) .duet-collapsible-content{display:block}.duet-collapsible-heading{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:"localtapiola-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:600;line-height:1.5;color:#00294d;cursor:pointer;border-radius:4px}.duet-collapsible-heading.duet-collapsible-normal-weight{font-weight:400}.duet-collapsible-heading.duet-theme-turva{font-family:"turva-sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";color:#171c3a}.duet-collapsible-heading .duet-collapsible-heading-content{flex:1}.duet-collapsible-heading:focus{outline:0}:host(.user-is-tabbing) .duet-collapsible-heading:focus{border-radius:4px;box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3}:host(.user-is-tabbing.duet-theme-turva) .duet-collapsible-heading:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a}.duet-collapsible-heading-icon{margin-right:8px !important;display:flex;align-items:center;justify-content:center;color:#00294d;transition:transform 300ms ease}.duet-collapsible-heading-icon:last-child,.duet-collapsible-heading-icon:last-of-type{margin-right:0 !important}[aria-expanded=true] .duet-collapsible-heading-icon{transform:rotate(180deg)}';export{m as duet_collapsible}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Duet Design System
|
|
3
|
-
*/
|
|
4
|
-
import{t as tokens}from"./tokens.module-f4572ed7.js";var allowedThemes=["turva"];function isDashCase(e){var r=e.includes("-");var t=e.includes(" ")||e.includes("_");var a=e.charAt(0)==="-";return r&&!t&&!a}function capitalize(e){if(e===void 0){e=""}return"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))}function lowerCaseFirst(e){if(e===void 0){e=""}return"".concat(e.charAt(0).toLowerCase()).concat(e.slice(1))}function camelize(e){if(e===void 0){e=""}var r=e.split("-");r.forEach((function(e,t){r[t]=capitalize(e)}));return r.join("")}function getTheme(e){if(e===void 0){e=""}if(allowedThemes.includes(e.toLowerCase())){return e.toLowerCase()}return""}function capitalizeFirstLetter(e){return e.charAt(0).toUpperCase()+e.slice(1)}function hasType(e,r){if(r===void 0){r=""}return r.indexOf(capitalizeFirstLetter(e))===0||r.indexOf(e)===0}function addPrefix(e,r){if(r===void 0){r=""}if(r&&!isDashCase(r)&&!hasType(e,r)){return"".concat(e).concat(capitalize(r))}return r}function addTheme(e,r){var t=getTheme(r).length;if(t&&e.indexOf(r)===-1){return"".concat(e).concat(capitalize(r))}return e}function getColorByName(e,r){if(r===void 0){r=""}if(!e){return undefined}var t=convertToColorName(e);var a=convertToColorName(e,r);var o=tokens[a];if(!o){o=tokens[t]}return o}function convertToColorName(e,r){if(e===void 0){e=""}if(r===void 0){r=""}var t=e;var a=isDashCase(e);if(a){t=camelize(t)}t=addPrefix("color",t);t=addTheme(t,r);t=lowerCaseFirst(t);return t}function shadeRGBColor(e,r){var t=e.split(","),a=r<0?0:255,o=r<0?r*-1:r;var n=parseInt(t[0].slice(4)),i=parseInt(t[1]),c=parseInt(t[2]);n=Math.round((a-n)*o)+n;i=Math.round((a-i)*o)+i;c=Math.round((a-c)*o)+c;n=n<0?0:n;n=n>255?255:n;i=i<0?0:i;i=i>255?255:i;c=c<0?0:c;c=c>255?255:c;return"rgb(".concat(n,",").concat(i,",").concat(c,")")}export{getColorByName as g,shadeRGBColor as s};
|