@warp-ds/elements 2.6.0 → 2.7.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dist/custom-elements.json +1552 -0
  2. package/dist/index.d.ts +561 -0
  3. package/dist/packages/affix/affix.js +11 -11
  4. package/dist/packages/affix/affix.js.map +3 -3
  5. package/dist/packages/alert/alert.js +7 -7
  6. package/dist/packages/alert/alert.js.map +3 -3
  7. package/dist/packages/attention/attention.js +22 -22
  8. package/dist/packages/attention/attention.js.map +3 -3
  9. package/dist/packages/breadcrumbs/breadcrumbs.js +9 -9
  10. package/dist/packages/breadcrumbs/breadcrumbs.js.map +3 -3
  11. package/dist/packages/button/button.js +11 -11
  12. package/dist/packages/button/button.js.map +3 -3
  13. package/dist/packages/card/card.js +8 -8
  14. package/dist/packages/card/card.js.map +3 -3
  15. package/dist/packages/checkbox/checkbox.a11y.test.d.ts +1 -0
  16. package/dist/packages/checkbox/checkbox.a11y.test.js +73 -0
  17. package/dist/packages/checkbox/checkbox.d.ts +49 -0
  18. package/dist/packages/checkbox/checkbox.js +2594 -0
  19. package/dist/packages/checkbox/checkbox.js.map +7 -0
  20. package/dist/packages/checkbox/checkbox.react.stories.d.ts +12 -0
  21. package/dist/packages/checkbox/checkbox.react.stories.js +10 -0
  22. package/dist/packages/checkbox/checkbox.stories.d.ts +25 -0
  23. package/dist/packages/checkbox/checkbox.stories.js +183 -0
  24. package/dist/packages/checkbox/checkbox.test.d.ts +1 -0
  25. package/dist/packages/checkbox/checkbox.test.js +142 -0
  26. package/dist/packages/checkbox/react.d.ts +5 -0
  27. package/dist/packages/checkbox/react.js +15 -0
  28. package/dist/packages/checkbox/styles.d.ts +1 -0
  29. package/dist/packages/checkbox/styles.js +134 -0
  30. package/dist/packages/checkbox-group/checkbox-group.a11y.test.d.ts +2 -0
  31. package/dist/packages/checkbox-group/checkbox-group.a11y.test.js +109 -0
  32. package/dist/packages/checkbox-group/checkbox-group.d.ts +33 -0
  33. package/dist/packages/checkbox-group/checkbox-group.js +71 -0
  34. package/dist/packages/checkbox-group/checkbox-group.js.map +7 -0
  35. package/dist/packages/checkbox-group/checkbox-group.test.d.ts +2 -0
  36. package/dist/packages/checkbox-group/checkbox-group.test.js +112 -0
  37. package/dist/packages/checkbox-group/locales/da/messages.d.mts +1 -0
  38. package/dist/packages/checkbox-group/locales/da/messages.mjs +1 -0
  39. package/dist/packages/checkbox-group/locales/en/messages.d.mts +1 -0
  40. package/dist/packages/checkbox-group/locales/en/messages.mjs +1 -0
  41. package/dist/packages/checkbox-group/locales/fi/messages.d.mts +1 -0
  42. package/dist/packages/checkbox-group/locales/fi/messages.mjs +1 -0
  43. package/dist/packages/checkbox-group/locales/nb/messages.d.mts +1 -0
  44. package/dist/packages/checkbox-group/locales/nb/messages.mjs +1 -0
  45. package/dist/packages/checkbox-group/locales/sv/messages.d.mts +1 -0
  46. package/dist/packages/checkbox-group/locales/sv/messages.mjs +1 -0
  47. package/dist/packages/checkbox-group/react.d.ts +2 -0
  48. package/dist/packages/checkbox-group/react.js +11 -0
  49. package/dist/packages/combobox/combobox.js +11 -11
  50. package/dist/packages/combobox/combobox.js.map +3 -3
  51. package/dist/packages/datepicker/datepicker.js +42 -42
  52. package/dist/packages/datepicker/datepicker.js.map +3 -3
  53. package/dist/packages/expandable/expandable.js +11 -11
  54. package/dist/packages/expandable/expandable.js.map +3 -3
  55. package/dist/packages/i18n.d.ts +2 -0
  56. package/dist/packages/i18n.js +87 -2
  57. package/dist/packages/modal-header/modal-header.js +15 -15
  58. package/dist/packages/modal-header/modal-header.js.map +3 -3
  59. package/dist/packages/page-indicator/page-indicator.js +7 -7
  60. package/dist/packages/page-indicator/page-indicator.js.map +3 -3
  61. package/dist/packages/pagination/pagination.js +24 -24
  62. package/dist/packages/pagination/pagination.js.map +3 -3
  63. package/dist/packages/pill/pill.js +10 -10
  64. package/dist/packages/pill/pill.js.map +3 -3
  65. package/dist/packages/select/select.js +20 -20
  66. package/dist/packages/select/select.js.map +3 -3
  67. package/dist/packages/slider/Slider.d.ts +2 -0
  68. package/dist/packages/slider/Slider.js +8 -0
  69. package/dist/packages/slider/index.d.ts +2 -0
  70. package/dist/packages/slider/index.js +2 -0
  71. package/dist/packages/slider/locales/da/messages.d.mts +1 -0
  72. package/dist/packages/slider/locales/da/messages.mjs +1 -0
  73. package/dist/packages/slider/locales/en/messages.d.mts +1 -0
  74. package/dist/packages/slider/locales/en/messages.mjs +1 -0
  75. package/dist/packages/slider/locales/fi/messages.d.mts +1 -0
  76. package/dist/packages/slider/locales/fi/messages.mjs +1 -0
  77. package/dist/packages/slider/locales/nb/messages.d.mts +1 -0
  78. package/dist/packages/slider/locales/nb/messages.mjs +1 -0
  79. package/dist/packages/slider/locales/sv/messages.d.mts +1 -0
  80. package/dist/packages/slider/locales/sv/messages.mjs +1 -0
  81. package/dist/packages/slider/react.d.ts +3 -0
  82. package/dist/packages/slider/react.js +13 -0
  83. package/dist/packages/slider/slider.d.ts +64 -0
  84. package/dist/packages/slider/slider.js +2641 -0
  85. package/dist/packages/slider/slider.js.map +7 -0
  86. package/dist/packages/slider/slider.react.stories.d.ts +19 -0
  87. package/dist/packages/slider/slider.react.stories.js +161 -0
  88. package/dist/packages/slider/slider.stories.d.ts +26 -0
  89. package/dist/packages/slider/slider.stories.js +464 -0
  90. package/dist/packages/slider/slider.test.d.ts +5 -0
  91. package/dist/packages/slider/slider.test.js +380 -0
  92. package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
  93. package/dist/packages/slider/styles/w-slider.styles.js +154 -0
  94. package/dist/packages/slider/styles.d.ts +1 -0
  95. package/dist/packages/slider/styles.js +2 -0
  96. package/dist/packages/slider-thumb/SliderThumb.d.ts +2 -0
  97. package/dist/packages/slider-thumb/SliderThumb.js +8 -0
  98. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.d.ts +2 -0
  99. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.js +3 -0
  100. package/dist/packages/slider-thumb/react.d.ts +6 -0
  101. package/dist/packages/slider-thumb/react.js +15 -0
  102. package/dist/packages/slider-thumb/slider-thumb.d.ts +72 -0
  103. package/dist/packages/slider-thumb/slider-thumb.js +2774 -0
  104. package/dist/packages/slider-thumb/slider-thumb.js.map +7 -0
  105. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.d.ts +1 -0
  106. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.js +194 -0
  107. package/dist/packages/step/step.js +13 -13
  108. package/dist/packages/step/step.js.map +3 -3
  109. package/dist/packages/step-indicator/step-indicator.a11y.test.js +6 -2
  110. package/dist/packages/textarea/textarea.a11y.test.js +1 -1
  111. package/dist/packages/textarea/textarea.test.js +2 -1
  112. package/dist/packages/textfield/styles/w-textfield.styles.js +6 -0
  113. package/dist/packages/textfield/textfield.js +7 -1
  114. package/dist/packages/textfield/textfield.js.map +2 -2
  115. package/dist/packages/toast/toast.js +13 -13
  116. package/dist/packages/toast/toast.js.map +3 -3
  117. package/dist/setup-tests.js +1 -1
  118. package/dist/web-types.json +328 -1
  119. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -27,6 +27,10 @@ import type { WarpTabs } from "./packages/tabs/tabs.ts";
27
27
  import type { WarpTextarea } from "./packages/textarea/textarea.ts";
28
28
  import type { WarpTextField } from "./packages/textfield/textfield.ts";
29
29
  import type { WarpToastContainer } from "./packages/toast-container/toast-container.ts";
30
+ import type { WCheckbox } from "./packages/checkbox/checkbox.ts";
31
+ import type { WCheckboxGroup } from "./packages/checkbox-group/checkbox-group.ts";
32
+ import type { WarpSliderThumb } from "./packages/slider-thumb/slider-thumb.ts";
33
+ import type { WarpSlider } from "./packages/slider/slider.ts";
30
34
 
31
35
  /**
32
36
  * This type can be used to create scoped tags for your components.
@@ -1441,6 +1445,252 @@ export type WarpToastContainerSolidJsProps = {
1441
1445
  textContent?: string | number;
1442
1446
  };
1443
1447
 
1448
+ export type WCheckboxProps = {
1449
+ /** The name of the checkbox, submitted as a name/value pair with form data. */
1450
+ name?: WCheckbox["name"];
1451
+ /** The value of the checkbox, submitted as a name/value pair with form data. */
1452
+ value?: WCheckbox["value"];
1453
+ /** Draws the checkbox in an indeterminate state. */
1454
+ indeterminate?: WCheckbox["indeterminate"];
1455
+ /** Draws the checkbox in a checked state (reflected to attribute). */
1456
+ checked?: WCheckbox["checked"];
1457
+ /** Disables the checkbox. */
1458
+ disabled?: WCheckbox["disabled"];
1459
+ /** Makes the checkbox a required field. */
1460
+ required?: WCheckbox["required"];
1461
+ /** Draws the checkbox in an invalid state. */
1462
+ invalid?: WCheckbox["invalid"];
1463
+ /** */
1464
+ input?: WCheckbox["input"];
1465
+
1466
+ /** */
1467
+ onchange?: (e: Event) => void;
1468
+ };
1469
+
1470
+ export type WCheckboxSolidJsProps = {
1471
+ /** The name of the checkbox, submitted as a name/value pair with form data. */
1472
+ "prop:name"?: WCheckbox["name"];
1473
+ /** The value of the checkbox, submitted as a name/value pair with form data. */
1474
+ "prop:value"?: WCheckbox["value"];
1475
+ /** Draws the checkbox in an indeterminate state. */
1476
+ "prop:indeterminate"?: WCheckbox["indeterminate"];
1477
+ /** Draws the checkbox in a checked state (reflected to attribute). */
1478
+ "prop:checked"?: WCheckbox["checked"];
1479
+ /** Disables the checkbox. */
1480
+ "prop:disabled"?: WCheckbox["disabled"];
1481
+ /** Makes the checkbox a required field. */
1482
+ "prop:required"?: WCheckbox["required"];
1483
+ /** Draws the checkbox in an invalid state. */
1484
+ "prop:invalid"?: WCheckbox["invalid"];
1485
+ /** */
1486
+ "prop:input"?: WCheckbox["input"];
1487
+ /** */
1488
+ "on:change"?: (e: Event) => void;
1489
+
1490
+ /** Set the innerHTML of the element */
1491
+ innerHTML?: string;
1492
+ /** Set the textContent of the element */
1493
+ textContent?: string | number;
1494
+ };
1495
+
1496
+ export type WCheckboxGroupProps = {
1497
+ /** The group label displayed above the checkboxes. */
1498
+ label?: WCheckboxGroup["label"];
1499
+ /** The name applied to child checkboxes when they do not provide one. */
1500
+ name?: WCheckboxGroup["name"];
1501
+ /** Whether to show optional text next to the label. */
1502
+ optional?: WCheckboxGroup["optional"];
1503
+ /** */
1504
+ "help-text"?: WCheckboxGroup["helpText"];
1505
+ /** */
1506
+ helpText?: WCheckboxGroup["helpText"];
1507
+ /** Makes the checkbox group required. */
1508
+ required?: WCheckboxGroup["required"];
1509
+ /** Marks the checkbox group as invalid. */
1510
+ invalid?: WCheckboxGroup["invalid"];
1511
+ };
1512
+
1513
+ export type WCheckboxGroupSolidJsProps = {
1514
+ /** The group label displayed above the checkboxes. */
1515
+ "prop:label"?: WCheckboxGroup["label"];
1516
+ /** The name applied to child checkboxes when they do not provide one. */
1517
+ "prop:name"?: WCheckboxGroup["name"];
1518
+ /** Whether to show optional text next to the label. */
1519
+ "prop:optional"?: WCheckboxGroup["optional"];
1520
+ /** */
1521
+ "attr:help-text"?: WCheckboxGroup["helpText"];
1522
+ /** */
1523
+ "prop:helpText"?: WCheckboxGroup["helpText"];
1524
+ /** Makes the checkbox group required. */
1525
+ "prop:required"?: WCheckboxGroup["required"];
1526
+ /** Marks the checkbox group as invalid. */
1527
+ "prop:invalid"?: WCheckboxGroup["invalid"];
1528
+
1529
+ /** Set the innerHTML of the element */
1530
+ innerHTML?: string;
1531
+ /** Set the textContent of the element */
1532
+ textContent?: string | number;
1533
+ };
1534
+
1535
+ export type WarpSliderThumbProps = {
1536
+ /** */
1537
+ "aria-label"?: WarpSliderThumb["ariaLabel"];
1538
+ /** */
1539
+ ariaLabel?: WarpSliderThumb["ariaLabel"];
1540
+ /** */
1541
+ "aria-description"?: WarpSliderThumb["ariaDescription"];
1542
+ /** */
1543
+ ariaDescription?: WarpSliderThumb["ariaDescription"];
1544
+ /** */
1545
+ name?: WarpSliderThumb["name"];
1546
+ /** */
1547
+ value?: WarpSliderThumb["value"];
1548
+ /** */
1549
+ placeholder?: WarpSliderThumb["placeholder"];
1550
+ /** */
1551
+ range?: WarpSliderThumb["range"];
1552
+ /** */
1553
+ tooltipTarget?: WarpSliderThumb["tooltipTarget"];
1554
+ /** */
1555
+ textfield?: WarpSliderThumb["textfield"];
1556
+
1557
+ /** */
1558
+ onslidervalidity?: (e: CustomEvent) => void;
1559
+ };
1560
+
1561
+ export type WarpSliderThumbSolidJsProps = {
1562
+ /** */
1563
+ "attr:aria-label"?: WarpSliderThumb["ariaLabel"];
1564
+ /** */
1565
+ "prop:ariaLabel"?: WarpSliderThumb["ariaLabel"];
1566
+ /** */
1567
+ "attr:aria-description"?: WarpSliderThumb["ariaDescription"];
1568
+ /** */
1569
+ "prop:ariaDescription"?: WarpSliderThumb["ariaDescription"];
1570
+ /** */
1571
+ "prop:name"?: WarpSliderThumb["name"];
1572
+ /** */
1573
+ "prop:value"?: WarpSliderThumb["value"];
1574
+ /** */
1575
+ "prop:placeholder"?: WarpSliderThumb["placeholder"];
1576
+ /** */
1577
+ "prop:range"?: WarpSliderThumb["range"];
1578
+ /** */
1579
+ "prop:tooltipTarget"?: WarpSliderThumb["tooltipTarget"];
1580
+ /** */
1581
+ "prop:textfield"?: WarpSliderThumb["textfield"];
1582
+ /** */
1583
+ "on:slidervalidity"?: (e: CustomEvent) => void;
1584
+
1585
+ /** Set the innerHTML of the element */
1586
+ innerHTML?: string;
1587
+ /** Set the textContent of the element */
1588
+ textContent?: string | number;
1589
+ };
1590
+
1591
+ export type WarpSliderProps = {
1592
+ /** The slider fieldset label. Required for proper accessibility.
1593
+
1594
+ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`) */
1595
+ label?: WarpSlider["label"];
1596
+ /** */
1597
+ disabled?: WarpSlider["disabled"];
1598
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1599
+ "open-ended"?: WarpSlider["openEnded"];
1600
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1601
+ openEnded?: WarpSlider["openEnded"];
1602
+ /** */
1603
+ error?: WarpSlider["error"];
1604
+ /** */
1605
+ "help-text"?: WarpSlider["helpText"];
1606
+ /** */
1607
+ helpText?: WarpSlider["helpText"];
1608
+ /** */
1609
+ invalid?: WarpSlider["invalid"];
1610
+ /** Ensures a child slider thumb has a value before allowing the containing form to submit. */
1611
+ required?: WarpSlider["required"];
1612
+ /** */
1613
+ min?: WarpSlider["min"];
1614
+ /** */
1615
+ max?: WarpSlider["max"];
1616
+ /** Pass a value similar to step to create visual markers at that interval */
1617
+ markers?: WarpSlider["markers"];
1618
+ /** */
1619
+ step?: WarpSlider["step"];
1620
+ /** Suffix used in text input fields and for the min and max values of the slider. */
1621
+ suffix?: WarpSlider["suffix"];
1622
+ /** */
1623
+ "hidden-textfield"?: WarpSlider["hiddenTextfield"];
1624
+ /** */
1625
+ hiddenTextfield?: WarpSlider["hiddenTextfield"];
1626
+ /** Formatter for the tooltip and input mask values. */
1627
+ valueFormatter?: WarpSlider["valueFormatter"];
1628
+ /** Formatter for the min and max labels below the range. */
1629
+ labelFormatter?: WarpSlider["labelFormatter"];
1630
+ /** */
1631
+ _invalidMessage?: WarpSlider["_invalidMessage"];
1632
+ /** */
1633
+ _hasInternalError?: WarpSlider["_hasInternalError"];
1634
+ /** */
1635
+ _showError?: WarpSlider["_showError"];
1636
+ /** */
1637
+ _tabbableElements?: WarpSlider["_tabbableElements"];
1638
+ };
1639
+
1640
+ export type WarpSliderSolidJsProps = {
1641
+ /** The slider fieldset label. Required for proper accessibility.
1642
+
1643
+ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`) */
1644
+ "prop:label"?: WarpSlider["label"];
1645
+ /** */
1646
+ "prop:disabled"?: WarpSlider["disabled"];
1647
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1648
+ "bool:open-ended"?: WarpSlider["openEnded"];
1649
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1650
+ "prop:openEnded"?: WarpSlider["openEnded"];
1651
+ /** */
1652
+ "prop:error"?: WarpSlider["error"];
1653
+ /** */
1654
+ "attr:help-text"?: WarpSlider["helpText"];
1655
+ /** */
1656
+ "prop:helpText"?: WarpSlider["helpText"];
1657
+ /** */
1658
+ "prop:invalid"?: WarpSlider["invalid"];
1659
+ /** Ensures a child slider thumb has a value before allowing the containing form to submit. */
1660
+ "prop:required"?: WarpSlider["required"];
1661
+ /** */
1662
+ "prop:min"?: WarpSlider["min"];
1663
+ /** */
1664
+ "prop:max"?: WarpSlider["max"];
1665
+ /** Pass a value similar to step to create visual markers at that interval */
1666
+ "prop:markers"?: WarpSlider["markers"];
1667
+ /** */
1668
+ "prop:step"?: WarpSlider["step"];
1669
+ /** Suffix used in text input fields and for the min and max values of the slider. */
1670
+ "prop:suffix"?: WarpSlider["suffix"];
1671
+ /** */
1672
+ "bool:hidden-textfield"?: WarpSlider["hiddenTextfield"];
1673
+ /** */
1674
+ "prop:hiddenTextfield"?: WarpSlider["hiddenTextfield"];
1675
+ /** Formatter for the tooltip and input mask values. */
1676
+ "prop:valueFormatter"?: WarpSlider["valueFormatter"];
1677
+ /** Formatter for the min and max labels below the range. */
1678
+ "prop:labelFormatter"?: WarpSlider["labelFormatter"];
1679
+ /** */
1680
+ "prop:_invalidMessage"?: WarpSlider["_invalidMessage"];
1681
+ /** */
1682
+ "prop:_hasInternalError"?: WarpSlider["_hasInternalError"];
1683
+ /** */
1684
+ "prop:_showError"?: WarpSlider["_showError"];
1685
+ /** */
1686
+ "prop:_tabbableElements"?: WarpSlider["_tabbableElements"];
1687
+
1688
+ /** Set the innerHTML of the element */
1689
+ innerHTML?: string;
1690
+ /** Set the textContent of the element */
1691
+ textContent?: string | number;
1692
+ };
1693
+
1444
1694
  export type CustomElements = {
1445
1695
  /**
1446
1696
  *
@@ -2189,6 +2439,155 @@ export type CustomElements = {
2189
2439
  "w-toast-container": Partial<
2190
2440
  WarpToastContainerProps & BaseProps<WarpToastContainer> & BaseEvents
2191
2441
  >;
2442
+
2443
+ /**
2444
+ *
2445
+ *
2446
+ * ## Attributes & Properties
2447
+ *
2448
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
2449
+ *
2450
+ * - `name`: The name of the checkbox, submitted as a name/value pair with form data.
2451
+ * - `value`: The value of the checkbox, submitted as a name/value pair with form data.
2452
+ * - `indeterminate`: Draws the checkbox in an indeterminate state.
2453
+ * - `checked`: Draws the checkbox in a checked state (reflected to attribute).
2454
+ * - `disabled`: Disables the checkbox.
2455
+ * - `required`: Makes the checkbox a required field.
2456
+ * - `invalid`: Draws the checkbox in an invalid state.
2457
+ * - `input`: undefined (property only)
2458
+ * - `validationMessage`: Returns the validation message if the checkbox is invalid, otherwise an empty string (property only) (readonly)
2459
+ * - `validity`: Returns the validity state of the checkbox (property only) (readonly)
2460
+ *
2461
+ * ## Events
2462
+ *
2463
+ * Events that will be emitted by the component.
2464
+ *
2465
+ * - `change`: undefined
2466
+ *
2467
+ * ## Methods
2468
+ *
2469
+ * Methods that can be called to access component functionality.
2470
+ *
2471
+ * - `resetFormControl() => void`: undefined
2472
+ * - `click() => void`: undefined
2473
+ * - `focus(options?: FocusOptions) => void`: undefined
2474
+ * - `blur() => void`: undefined
2475
+ * - `checkValidity() => boolean`: Checks whether the checkbox passes constraint validation
2476
+ * - `reportValidity() => boolean`: Checks validity and shows the browser's validation message if invalid
2477
+ */
2478
+ "w-checkbox": Partial<WCheckboxProps & BaseProps<WCheckbox> & BaseEvents>;
2479
+
2480
+ /**
2481
+ *
2482
+ *
2483
+ * ## Attributes & Properties
2484
+ *
2485
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
2486
+ *
2487
+ * - `label`: The group label displayed above the checkboxes.
2488
+ * - `name`: The name applied to child checkboxes when they do not provide one.
2489
+ * - `optional`: Whether to show optional text next to the label.
2490
+ * - `help-text`/`helpText`: undefined
2491
+ * - `required`: Makes the checkbox group required.
2492
+ * - `invalid`: Marks the checkbox group as invalid.
2493
+ *
2494
+ * ## Methods
2495
+ *
2496
+ * Methods that can be called to access component functionality.
2497
+ *
2498
+ * - `checkValidity() => boolean`: Checks whether the group passes constraint validation
2499
+ * - `reportValidity() => boolean`: Checks validity and shows the validation message if invalid
2500
+ * - `focus(options?: FocusOptions) => void`: Sets focus on the checkbox group.
2501
+ */
2502
+ "w-checkbox-group": Partial<
2503
+ WCheckboxGroupProps & BaseProps<WCheckboxGroup> & BaseEvents
2504
+ >;
2505
+
2506
+ /**
2507
+ * Component to place inside a `<w-slider>`.
2508
+ *
2509
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
2510
+ *
2511
+ * ## Attributes & Properties
2512
+ *
2513
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
2514
+ *
2515
+ * - `aria-label`/`ariaLabel`: undefined
2516
+ * - `aria-description`/`ariaDescription`: undefined
2517
+ * - `name`: undefined
2518
+ * - `value`: undefined
2519
+ * - `placeholder`: undefined
2520
+ * - `range`: undefined (property only)
2521
+ * - `tooltipTarget`: undefined (property only)
2522
+ * - `textfield`: undefined (property only)
2523
+ * - `boundaryValue`: undefined (property only) (readonly)
2524
+ * - `textFieldDisplayValue`: Value to display in the textfield (shows boundary when focused on empty value) (property only) (readonly)
2525
+ * - `tooltipDisplayValue`: Value to display in the tooltip (property only) (readonly)
2526
+ * - `ariaDescriptionText`: undefined (property only) (readonly)
2527
+ *
2528
+ * ## Events
2529
+ *
2530
+ * Events that will be emitted by the component.
2531
+ *
2532
+ * - `slidervalidity`: undefined
2533
+ *
2534
+ * ## Methods
2535
+ *
2536
+ * Methods that can be called to access component functionality.
2537
+ *
2538
+ * - `resetFormControl() => void`: undefined
2539
+ * - `updateFieldAfterValidation() => void`: undefined
2540
+ */
2541
+ "w-slider-thumb": Partial<
2542
+ WarpSliderThumbProps & BaseProps<WarpSliderThumb> & BaseEvents
2543
+ >;
2544
+
2545
+ /**
2546
+ * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
2547
+ *
2548
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
2549
+ *
2550
+ * ## Attributes & Properties
2551
+ *
2552
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
2553
+ *
2554
+ * - `label`: The slider fieldset label. Required for proper accessibility.
2555
+ *
2556
+ * If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`)
2557
+ * - `disabled`: undefined
2558
+ * - `open-ended`/`openEnded`: Whether or not to allow values outside the range such as "Before 1950" and "2025+".
2559
+ * - `error`: undefined
2560
+ * - `help-text`/`helpText`: undefined
2561
+ * - `invalid`: undefined
2562
+ * - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit.
2563
+ * - `min`: undefined
2564
+ * - `max`: undefined
2565
+ * - `markers`: Pass a value similar to step to create visual markers at that interval
2566
+ * - `step`: undefined
2567
+ * - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
2568
+ * - `hidden-textfield`/`hiddenTextfield`: undefined
2569
+ * - `valueFormatter`: Formatter for the tooltip and input mask values. (property only)
2570
+ * - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
2571
+ * - `_invalidMessage`: undefined (property only)
2572
+ * - `_hasInternalError`: undefined (property only)
2573
+ * - `_showError`: undefined (property only)
2574
+ * - `_tabbableElements`: undefined (property only)
2575
+ * - `edgeMin`: undefined (property only) (readonly)
2576
+ * - `edgeMax`: undefined (property only) (readonly)
2577
+ * - `componentHasError`: undefined (property only) (readonly)
2578
+ * - `errorText`: undefined (property only) (readonly)
2579
+ *
2580
+ * ## Slots
2581
+ *
2582
+ * Areas where markup can be added to the component.
2583
+ *
2584
+ * - `(default)`: For single sliders place a `<w-slider-thumb>` in the default slot.
2585
+ * - `label`: Label for the slider or range slider as a whole.
2586
+ * - `description`: Optional description between the label and slider.
2587
+ * - `from`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
2588
+ * - `to`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
2589
+ */
2590
+ "w-slider": Partial<WarpSliderProps & BaseProps<WarpSlider> & BaseEvents>;
2192
2591
  };
2193
2592
 
2194
2593
  export type CustomElementsSolidJs = {
@@ -3020,6 +3419,168 @@ export type CustomElementsSolidJs = {
3020
3419
  BaseProps<WarpToastContainer> &
3021
3420
  BaseEvents
3022
3421
  >;
3422
+
3423
+ /**
3424
+ *
3425
+ *
3426
+ * ## Attributes & Properties
3427
+ *
3428
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
3429
+ *
3430
+ * - `name`: The name of the checkbox, submitted as a name/value pair with form data.
3431
+ * - `value`: The value of the checkbox, submitted as a name/value pair with form data.
3432
+ * - `indeterminate`: Draws the checkbox in an indeterminate state.
3433
+ * - `checked`: Draws the checkbox in a checked state (reflected to attribute).
3434
+ * - `disabled`: Disables the checkbox.
3435
+ * - `required`: Makes the checkbox a required field.
3436
+ * - `invalid`: Draws the checkbox in an invalid state.
3437
+ * - `input`: undefined (property only)
3438
+ * - `validationMessage`: Returns the validation message if the checkbox is invalid, otherwise an empty string (property only) (readonly)
3439
+ * - `validity`: Returns the validity state of the checkbox (property only) (readonly)
3440
+ *
3441
+ * ## Events
3442
+ *
3443
+ * Events that will be emitted by the component.
3444
+ *
3445
+ * - `change`: undefined
3446
+ *
3447
+ * ## Methods
3448
+ *
3449
+ * Methods that can be called to access component functionality.
3450
+ *
3451
+ * - `resetFormControl() => void`: undefined
3452
+ * - `click() => void`: undefined
3453
+ * - `focus(options?: FocusOptions) => void`: undefined
3454
+ * - `blur() => void`: undefined
3455
+ * - `checkValidity() => boolean`: Checks whether the checkbox passes constraint validation
3456
+ * - `reportValidity() => boolean`: Checks validity and shows the browser's validation message if invalid
3457
+ */
3458
+ "w-checkbox": Partial<
3459
+ WCheckboxProps & WCheckboxSolidJsProps & BaseProps<WCheckbox> & BaseEvents
3460
+ >;
3461
+
3462
+ /**
3463
+ *
3464
+ *
3465
+ * ## Attributes & Properties
3466
+ *
3467
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
3468
+ *
3469
+ * - `label`: The group label displayed above the checkboxes.
3470
+ * - `name`: The name applied to child checkboxes when they do not provide one.
3471
+ * - `optional`: Whether to show optional text next to the label.
3472
+ * - `help-text`/`helpText`: undefined
3473
+ * - `required`: Makes the checkbox group required.
3474
+ * - `invalid`: Marks the checkbox group as invalid.
3475
+ *
3476
+ * ## Methods
3477
+ *
3478
+ * Methods that can be called to access component functionality.
3479
+ *
3480
+ * - `checkValidity() => boolean`: Checks whether the group passes constraint validation
3481
+ * - `reportValidity() => boolean`: Checks validity and shows the validation message if invalid
3482
+ * - `focus(options?: FocusOptions) => void`: Sets focus on the checkbox group.
3483
+ */
3484
+ "w-checkbox-group": Partial<
3485
+ WCheckboxGroupProps &
3486
+ WCheckboxGroupSolidJsProps &
3487
+ BaseProps<WCheckboxGroup> &
3488
+ BaseEvents
3489
+ >;
3490
+
3491
+ /**
3492
+ * Component to place inside a `<w-slider>`.
3493
+ *
3494
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
3495
+ *
3496
+ * ## Attributes & Properties
3497
+ *
3498
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
3499
+ *
3500
+ * - `aria-label`/`ariaLabel`: undefined
3501
+ * - `aria-description`/`ariaDescription`: undefined
3502
+ * - `name`: undefined
3503
+ * - `value`: undefined
3504
+ * - `placeholder`: undefined
3505
+ * - `range`: undefined (property only)
3506
+ * - `tooltipTarget`: undefined (property only)
3507
+ * - `textfield`: undefined (property only)
3508
+ * - `boundaryValue`: undefined (property only) (readonly)
3509
+ * - `textFieldDisplayValue`: Value to display in the textfield (shows boundary when focused on empty value) (property only) (readonly)
3510
+ * - `tooltipDisplayValue`: Value to display in the tooltip (property only) (readonly)
3511
+ * - `ariaDescriptionText`: undefined (property only) (readonly)
3512
+ *
3513
+ * ## Events
3514
+ *
3515
+ * Events that will be emitted by the component.
3516
+ *
3517
+ * - `slidervalidity`: undefined
3518
+ *
3519
+ * ## Methods
3520
+ *
3521
+ * Methods that can be called to access component functionality.
3522
+ *
3523
+ * - `resetFormControl() => void`: undefined
3524
+ * - `updateFieldAfterValidation() => void`: undefined
3525
+ */
3526
+ "w-slider-thumb": Partial<
3527
+ WarpSliderThumbProps &
3528
+ WarpSliderThumbSolidJsProps &
3529
+ BaseProps<WarpSliderThumb> &
3530
+ BaseEvents
3531
+ >;
3532
+
3533
+ /**
3534
+ * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
3535
+ *
3536
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
3537
+ *
3538
+ * ## Attributes & Properties
3539
+ *
3540
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
3541
+ *
3542
+ * - `label`: The slider fieldset label. Required for proper accessibility.
3543
+ *
3544
+ * If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`)
3545
+ * - `disabled`: undefined
3546
+ * - `open-ended`/`openEnded`: Whether or not to allow values outside the range such as "Before 1950" and "2025+".
3547
+ * - `error`: undefined
3548
+ * - `help-text`/`helpText`: undefined
3549
+ * - `invalid`: undefined
3550
+ * - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit.
3551
+ * - `min`: undefined
3552
+ * - `max`: undefined
3553
+ * - `markers`: Pass a value similar to step to create visual markers at that interval
3554
+ * - `step`: undefined
3555
+ * - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
3556
+ * - `hidden-textfield`/`hiddenTextfield`: undefined
3557
+ * - `valueFormatter`: Formatter for the tooltip and input mask values. (property only)
3558
+ * - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
3559
+ * - `_invalidMessage`: undefined (property only)
3560
+ * - `_hasInternalError`: undefined (property only)
3561
+ * - `_showError`: undefined (property only)
3562
+ * - `_tabbableElements`: undefined (property only)
3563
+ * - `edgeMin`: undefined (property only) (readonly)
3564
+ * - `edgeMax`: undefined (property only) (readonly)
3565
+ * - `componentHasError`: undefined (property only) (readonly)
3566
+ * - `errorText`: undefined (property only) (readonly)
3567
+ *
3568
+ * ## Slots
3569
+ *
3570
+ * Areas where markup can be added to the component.
3571
+ *
3572
+ * - `(default)`: For single sliders place a `<w-slider-thumb>` in the default slot.
3573
+ * - `label`: Label for the slider or range slider as a whole.
3574
+ * - `description`: Optional description between the label and slider.
3575
+ * - `from`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
3576
+ * - `to`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
3577
+ */
3578
+ "w-slider": Partial<
3579
+ WarpSliderProps &
3580
+ WarpSliderSolidJsProps &
3581
+ BaseProps<WarpSlider> &
3582
+ BaseEvents
3583
+ >;
3023
3584
  };
3024
3585
 
3025
3586
  export type CustomCssProperties = {};
@@ -1,4 +1,4 @@
1
- var _=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var i=(e,t,o,r)=>{for(var a=r>1?void 0:r?Y(t,o):t,l=e.length-1,b;l>=0;l--)(b=e[l])&&(a=(r?b(t,o,a):b(a))||a);return r&&a&&_(t,o,a),a};var p=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.reduce(function(o,r){return o.concat(typeof r=="string"?r:Array.isArray(r)?p.apply(void 0,r):typeof r=="object"&&r?Object.keys(r).map(function(a){return r[a]?a:""}):"")},[]).join(" ")};import{html as c,LitElement as B}from"lit";import{property as d}from"lit/decorators.js";import{ifDefined as y}from"lit/directives/if-defined.js";import{css as u}from"lit";var m=u`
1
+ var L=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var i=(e,o,r,t)=>{for(var a=t>1?void 0:t?E(o,r):o,l=e.length-1,p;l>=0;l--)(p=e[l])&&(a=(t?p(o,r,a):p(a))||a);return t&&a&&L(o,r,a),a};var g=function(){for(var e=[],o=arguments.length;o--;)e[o]=arguments[o];return e.reduce(function(r,t){return r.concat(typeof t=="string"?t:Array.isArray(t)?g.apply(void 0,t):typeof t=="object"&&t?Object.keys(t).map(function(a){return t[a]?a:""}):"")},[]).join(" ")};import{html as d,LitElement as F}from"lit";import{property as b}from"lit/decorators.js";import{ifDefined as z}from"lit/directives/if-defined.js";import{css as w}from"lit";var f=w`
2
2
  *,
3
3
  :before,
4
4
  :after {
@@ -271,7 +271,7 @@ var _=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var i=(e,t,o,r
271
271
  svg {
272
272
  pointer-events: none;
273
273
  }
274
- `,G=u`*, :before, :after {
274
+ `,I=w`*, :before, :after {
275
275
  --w-rotate: 0;
276
276
  --w-rotate-x: 0;
277
277
  --w-rotate-y: 0;
@@ -2437,7 +2437,7 @@ var _=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var i=(e,t,o,r
2437
2437
  display: none
2438
2438
  }
2439
2439
  }
2440
- `;import{css as M}from"lit";var w=M`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{html as L,LitElement as S}from"lit";import{property as g,state as $}from"lit/decorators.js";import{classMap as E}from"lit/directives/class-map.js";import{css as j}from"lit";var f=j`
2440
+ `;import{css as Y}from"lit";var x=Y`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{html as j,LitElement as S}from"lit";import{property as u,state as $}from"lit/decorators.js";import{classMap as P}from"lit/directives/class-map.js";import{css as M}from"lit";var k=M`
2441
2441
  :host {
2442
2442
  display: inline-block;
2443
2443
  }
@@ -2462,17 +2462,17 @@ var _=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var i=(e,t,o,r
2462
2462
  --w-icon-size: 32px;
2463
2463
  }
2464
2464
 
2465
- `;var v=new Map,P='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function X(e,t={}){var r;let o=(r=t.responseParser)!=null?r:(a=>a.text());return v.has(e)||v.set(e,fetch(e).then(o)),v.get(e)}var n=class extends S{constructor(){super(...arguments);this.name="";this.size="medium";this.locale="en";this.svg=null}async fetchIcon(o){let r=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${o}.svg`;try{let a=await X(r);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(o){(o.has("name")||o.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let o=await this.fetchIcon(this.name);o||(o=new DOMParser().parseFromString(P,"text/html").body.firstElementChild),this.svg=o}render(){let o={"w-icon":!0,"w-icon--s":this.size==="small","w-icon--m":this.size==="medium","w-icon--l":this.size==="large"},r=typeof this.size=="string"&&this.size.endsWith("px")?`--w-icon-size: ${this.size};`:"";return L`<div class="${E(o)}" style="${r}" part="w-${this.name.toLowerCase()}">${this.svg}</div>`}};n.styles=[f],i([g({type:String,reflect:!0})],n.prototype,"name",2),i([g({type:String,reflect:!0})],n.prototype,"size",2),i([g({type:String,reflect:!0})],n.prototype,"locale",2),i([$()],n.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",n);var Z=["en","nb","fi","da","sv"],k="en",x=e=>Z.find(t=>e===t||e.toLowerCase().includes(t))||k;function h(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return x(e)}try{let e=document.documentElement.lang;return x(e)}catch(e){return console.warn("could not detect locale, falling back to source locale",e),k}}var z="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",T={wrapper:z+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},R={wrapper:z+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},s=class extends B{constructor(){super(...arguments);this.clear=!1;this.search=!1}get _classBase(){return this.slot==="suffix"?T:R}get _classes(){return p([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}get _searchButton(){return c`
2466
- <button aria-label="${y(this.ariaLabel)}" class="${this._classes}" type="submit">
2467
- <w-icon name="Search" size="small" locale="${h()}" class="flex"></w-icon>
2465
+ `;var v=new Map,T='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"></svg>';function X(e,o={}){var t;let r=(t=o.responseParser)!=null?t:(a=>a.text());return v.has(e)||v.set(e,fetch(e).then(r)),v.get(e)}var n=class extends S{constructor(){super(...arguments);this.name="";this.size="medium";this.locale="en";this.svg=null}async fetchIcon(r){let t=`https://assets.finn.no/pkg/eikons/v1/${this.locale}/${r}.svg`;try{let a=await X(t);return new DOMParser().parseFromString(a,"text/html").body.querySelector("svg")}catch(a){return null}}firstUpdated(){this.loadIcon()}updated(r){(r.has("name")||r.has("locale"))&&this.loadIcon()}async loadIcon(){if(!this.name){this.svg=null;return}let r=await this.fetchIcon(this.name);r||(r=new DOMParser().parseFromString(T,"text/html").body.firstElementChild),this.svg=r}render(){let r={"w-icon":!0,"w-icon--s":this.size==="small","w-icon--m":this.size==="medium","w-icon--l":this.size==="large"},t=typeof this.size=="string"&&this.size.endsWith("px")?`--w-icon-size: ${this.size};`:"";return j`<div class="${P(r)}" style="${t}" part="w-${this.name.toLowerCase()}">${this.svg}</div>`}};n.styles=[k],i([u({type:String,reflect:!0})],n.prototype,"name",2),i([u({type:String,reflect:!0})],n.prototype,"size",2),i([u({type:String,reflect:!0})],n.prototype,"locale",2),i([$()],n.prototype,"svg",2);customElements.get("w-icon")||customElements.define("w-icon",n);var Z=["en","nb","fi","da","sv"],h="en",c=e=>Z.find(o=>e===o||e.toLowerCase().includes(o))||h;function m(){if(typeof window=="undefined"){let e=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return c(e)}try{let e=y(document);if(e)return c(e);let o=C();if(o)return c(o);let r=y(B());return r?c(r):h}catch(e){return console.warn("could not detect locale, falling back to source locale",e),h}}function B(){var e,o;try{return(o=(e=window.parent)==null?void 0:e.document)!=null?o:null}catch(r){return null}}function y(e){var o,r;try{return(r=(o=e==null?void 0:e.documentElement)==null?void 0:o.lang)!=null?r:""}catch(t){return""}}function C(){var e,o,r;try{return(r=(o=(e=window.frameElement)==null?void 0:e.getAttribute)==null?void 0:o.call(e,"lang"))!=null?r:""}catch(t){return""}}var _="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",O={wrapper:_+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},R={wrapper:_+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},s=class extends F{constructor(){super(...arguments);this.clear=!1;this.search=!1}get _classBase(){return this.slot==="suffix"?O:R}get _classes(){return g([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}get _searchButton(){return d`
2466
+ <button aria-label="${z(this.ariaLabel)}" class="${this._classes}" type="submit">
2467
+ <w-icon name="Search" size="small" locale="${m()}" class="flex"></w-icon>
2468
2468
  </button>
2469
- `}get _clearButton(){return c`
2470
- <button aria-label="${y(this.ariaLabel)}" class="${this._classes}" type="reset">
2471
- <w-icon name="Close" size="small" locale="${h()}" class="flex"></w-icon>
2469
+ `}get _clearButton(){return d`
2470
+ <button aria-label="${z(this.ariaLabel)}" class="${this._classes}" type="reset">
2471
+ <w-icon name="Close" size="small" locale="${m()}" class="flex"></w-icon>
2472
2472
  </button>
2473
- `}get _text(){return c`
2473
+ `}get _text(){return d`
2474
2474
  <div class="${this._classes}">
2475
2475
  <span class="${this._classBase.label}">${this.label}</span>
2476
2476
  </div>
2477
- `}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return c`${this._markup}`}};s.styles=[m,w],i([d({attribute:"aria-label"})],s.prototype,"ariaLabel",2),i([d({type:Boolean})],s.prototype,"clear",2),i([d({type:Boolean})],s.prototype,"search",2),i([d()],s.prototype,"label",2);customElements.get("w-affix")||customElements.define("w-affix",s);export{s as WarpAffix};
2477
+ `}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return d`${this._markup}`}};s.styles=[f,x],i([b({attribute:"aria-label"})],s.prototype,"ariaLabel",2),i([b({type:Boolean})],s.prototype,"clear",2),i([b({type:Boolean})],s.prototype,"search",2),i([b()],s.prototype,"label",2);customElements.get("w-affix")||customElements.define("w-affix",s);export{s as WarpAffix};
2478
2478
  //# sourceMappingURL=affix.js.map