@warp-ds/elements 2.9.0-next.6 → 2.9.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.
@@ -1469,7 +1469,7 @@
1469
1469
  "declarations": [
1470
1470
  {
1471
1471
  "kind": "class",
1472
- "description": "",
1472
+ "description": "Attention is a versatile component for displaying contextual information and messages. It can be used for a wide range of purposes, such as tooltips, callouts, popovers, and highlights.\n\nThe component is designed to be anchored to a trigger element, providing contextual information related to that element. It supports various placements and styling options to accommodate different use cases and design needs.\n\nNote: attention will soon be split into multiple components (tooltip, callout, popover, highlight) at which time this component will be deprecated. For now, use the `tooltip`, `callout`, `popover`, and `highlight` boolean properties to achieve the desired style and behavior.",
1473
1473
  "name": "WarpAttention",
1474
1474
  "members": [
1475
1475
  {
@@ -1479,6 +1479,7 @@
1479
1479
  "text": "boolean"
1480
1480
  },
1481
1481
  "default": "false",
1482
+ "description": "Controls whether the attention panel is visible.\nSet to `true` to show the attention content and `false` to hide it.",
1482
1483
  "attribute": "show",
1483
1484
  "reflects": true
1484
1485
  },
@@ -1488,6 +1489,7 @@
1488
1489
  "type": {
1489
1490
  "text": "Directions"
1490
1491
  },
1492
+ "description": "Preferred placement relative to the trigger element.\nSets the initial direction for positioning, for example `top`, `right`, `bottom`, or `left` variants.",
1491
1493
  "default": "'bottom'",
1492
1494
  "attribute": "placement"
1493
1495
  },
@@ -1498,6 +1500,7 @@
1498
1500
  "text": "boolean"
1499
1501
  },
1500
1502
  "default": "false",
1503
+ "description": "Renders the component with tooltip styling and behavior.\nUse for compact, non-modal contextual hints anchored to another element.",
1501
1504
  "attribute": "tooltip",
1502
1505
  "reflects": true
1503
1506
  },
@@ -1508,6 +1511,7 @@
1508
1511
  "text": "boolean"
1509
1512
  },
1510
1513
  "default": "false",
1514
+ "description": "Renders the component as an inline callout.\nCallout mode is used for always-in-flow informational content instead of floating overlay behavior.",
1511
1515
  "attribute": "callout",
1512
1516
  "reflects": true
1513
1517
  },
@@ -1517,6 +1521,7 @@
1517
1521
  "type": {
1518
1522
  "text": "boolean"
1519
1523
  },
1524
+ "description": "Enables native popover behavior for the attention element.\nWhen enabled, the component uses popover semantics and styling suitable for floating surface UI.",
1520
1525
  "default": "false",
1521
1526
  "attribute": "popover",
1522
1527
  "reflects": true
@@ -1528,6 +1533,7 @@
1528
1533
  "text": "boolean"
1529
1534
  },
1530
1535
  "default": "false",
1536
+ "description": "Renders the component with highlight styling.\nUse highlight mode to visually emphasize important contextual information.",
1531
1537
  "attribute": "highlight",
1532
1538
  "reflects": true
1533
1539
  },
@@ -1538,6 +1544,7 @@
1538
1544
  "text": "boolean"
1539
1545
  },
1540
1546
  "default": "false",
1547
+ "description": "Shows a close button inside the attention component.\nAdds an internal dismiss action that lets users close the attention panel.",
1541
1548
  "attribute": "can-close",
1542
1549
  "reflects": true
1543
1550
  },
@@ -1548,6 +1555,7 @@
1548
1555
  "text": "boolean"
1549
1556
  },
1550
1557
  "default": "false",
1558
+ "description": "Hides the directional arrow of the attention component.\nDisable the arrow when the visual connection to the trigger should not be shown.",
1551
1559
  "attribute": "no-arrow",
1552
1560
  "reflects": true
1553
1561
  },
@@ -1557,6 +1565,7 @@
1557
1565
  "type": {
1558
1566
  "text": "number"
1559
1567
  },
1568
+ "description": "Distance offset between trigger and attention panel.\nDefines the main-axis spacing in pixels from the anchor element.",
1560
1569
  "default": "8",
1561
1570
  "attribute": "distance"
1562
1571
  },
@@ -1566,6 +1575,7 @@
1566
1575
  "type": {
1567
1576
  "text": "number"
1568
1577
  },
1578
+ "description": "Cross-axis offset for fine-grained positioning.\nMoves the panel along the cross axis in pixels to adjust alignment with the trigger.",
1569
1579
  "default": "0",
1570
1580
  "attribute": "skidding"
1571
1581
  },
@@ -1576,6 +1586,7 @@
1576
1586
  "text": "boolean"
1577
1587
  },
1578
1588
  "default": "false",
1589
+ "description": "Enables automatic flipping when placement has no space.\nAllows the component to choose an alternative side if the preferred placement would overflow.",
1579
1590
  "attribute": "flip",
1580
1591
  "reflects": true
1581
1592
  },
@@ -1586,6 +1597,7 @@
1586
1597
  "text": "boolean"
1587
1598
  },
1588
1599
  "default": "false",
1600
+ "description": "Allows overflow checks on the cross axis when flipping.\nUse with `flip` to improve collision handling when space is constrained horizontally or vertically.",
1589
1601
  "attribute": "cross-axis",
1590
1602
  "reflects": true
1591
1603
  },
@@ -1595,6 +1607,8 @@
1595
1607
  "type": {
1596
1608
  "text": "Directions[]"
1597
1609
  },
1610
+ "default": "[]",
1611
+ "description": "Ordered list of fallback placements.\nProvides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit.",
1598
1612
  "attribute": "fallback-placements",
1599
1613
  "reflects": true
1600
1614
  },
@@ -1664,6 +1678,7 @@
1664
1678
  "text": "boolean"
1665
1679
  },
1666
1680
  "default": "false",
1681
+ "description": "Controls whether the attention panel is visible.\nSet to `true` to show the attention content and `false` to hide it.",
1667
1682
  "fieldName": "show"
1668
1683
  },
1669
1684
  {
@@ -1671,6 +1686,7 @@
1671
1686
  "type": {
1672
1687
  "text": "Directions"
1673
1688
  },
1689
+ "description": "Preferred placement relative to the trigger element.\nSets the initial direction for positioning, for example `top`, `right`, `bottom`, or `left` variants.",
1674
1690
  "default": "'bottom'",
1675
1691
  "fieldName": "placement"
1676
1692
  },
@@ -1680,6 +1696,7 @@
1680
1696
  "text": "boolean"
1681
1697
  },
1682
1698
  "default": "false",
1699
+ "description": "Renders the component with tooltip styling and behavior.\nUse for compact, non-modal contextual hints anchored to another element.",
1683
1700
  "fieldName": "tooltip"
1684
1701
  },
1685
1702
  {
@@ -1688,6 +1705,7 @@
1688
1705
  "text": "boolean"
1689
1706
  },
1690
1707
  "default": "false",
1708
+ "description": "Renders the component as an inline callout.\nCallout mode is used for always-in-flow informational content instead of floating overlay behavior.",
1691
1709
  "fieldName": "callout"
1692
1710
  },
1693
1711
  {
@@ -1695,6 +1713,7 @@
1695
1713
  "type": {
1696
1714
  "text": "boolean"
1697
1715
  },
1716
+ "description": "Enables native popover behavior for the attention element.\nWhen enabled, the component uses popover semantics and styling suitable for floating surface UI.",
1698
1717
  "default": "false",
1699
1718
  "fieldName": "popover"
1700
1719
  },
@@ -1704,6 +1723,7 @@
1704
1723
  "text": "boolean"
1705
1724
  },
1706
1725
  "default": "false",
1726
+ "description": "Renders the component with highlight styling.\nUse highlight mode to visually emphasize important contextual information.",
1707
1727
  "fieldName": "highlight"
1708
1728
  },
1709
1729
  {
@@ -1712,6 +1732,7 @@
1712
1732
  "text": "boolean"
1713
1733
  },
1714
1734
  "default": "false",
1735
+ "description": "Shows a close button inside the attention component.\nAdds an internal dismiss action that lets users close the attention panel.",
1715
1736
  "fieldName": "canClose"
1716
1737
  },
1717
1738
  {
@@ -1720,6 +1741,7 @@
1720
1741
  "text": "boolean"
1721
1742
  },
1722
1743
  "default": "false",
1744
+ "description": "Hides the directional arrow of the attention component.\nDisable the arrow when the visual connection to the trigger should not be shown.",
1723
1745
  "fieldName": "noArrow"
1724
1746
  },
1725
1747
  {
@@ -1727,6 +1749,7 @@
1727
1749
  "type": {
1728
1750
  "text": "number"
1729
1751
  },
1752
+ "description": "Distance offset between trigger and attention panel.\nDefines the main-axis spacing in pixels from the anchor element.",
1730
1753
  "default": "8",
1731
1754
  "fieldName": "distance"
1732
1755
  },
@@ -1735,6 +1758,7 @@
1735
1758
  "type": {
1736
1759
  "text": "number"
1737
1760
  },
1761
+ "description": "Cross-axis offset for fine-grained positioning.\nMoves the panel along the cross axis in pixels to adjust alignment with the trigger.",
1738
1762
  "default": "0",
1739
1763
  "fieldName": "skidding"
1740
1764
  },
@@ -1744,6 +1768,7 @@
1744
1768
  "text": "boolean"
1745
1769
  },
1746
1770
  "default": "false",
1771
+ "description": "Enables automatic flipping when placement has no space.\nAllows the component to choose an alternative side if the preferred placement would overflow.",
1747
1772
  "fieldName": "flip"
1748
1773
  },
1749
1774
  {
@@ -1752,6 +1777,7 @@
1752
1777
  "text": "boolean"
1753
1778
  },
1754
1779
  "default": "false",
1780
+ "description": "Allows overflow checks on the cross axis when flipping.\nUse with `flip` to improve collision handling when space is constrained horizontally or vertically.",
1755
1781
  "fieldName": "crossAxis"
1756
1782
  },
1757
1783
  {
@@ -1759,6 +1785,8 @@
1759
1785
  "type": {
1760
1786
  "text": "Directions[]"
1761
1787
  },
1788
+ "default": "[]",
1789
+ "description": "Ordered list of fallback placements.\nProvides explicit alternative placements to try when `flip` is enabled and the preferred placement does not fit.",
1762
1790
  "fieldName": "fallbackPlacements"
1763
1791
  }
1764
1792
  ],
@@ -8048,18 +8076,9 @@
8048
8076
  "declarations": [
8049
8077
  {
8050
8078
  "kind": "class",
8051
- "description": "A single line text input element.\n\n[See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-textfield--docs)",
8079
+ "description": "A multi-line text input with built-in form validation, auto-resizing, and styling support.\n\nThe component automatically handles:\n - Form integration\n - Auto-resizing based on content and row constraints\n - Built-in validation with customizable error messages\n - Accessibility attributes and labeling",
8052
8080
  "name": "WarpTextarea",
8053
8081
  "members": [
8054
- {
8055
- "kind": "field",
8056
- "name": "shadowRootOptions",
8057
- "type": {
8058
- "text": "object"
8059
- },
8060
- "static": true,
8061
- "default": "{ ...LitElement.shadowRootOptions, delegatesFocus: true, }"
8062
- },
8063
8082
  {
8064
8083
  "kind": "field",
8065
8084
  "name": "disabled",
@@ -8067,6 +8086,8 @@
8067
8086
  "text": "boolean"
8068
8087
  },
8069
8088
  "default": "false",
8089
+ "description": "Keep in mind that using disabled in its current form is an anti-pattern.\n\nThere will always be users who don't understand why an element is disabled, or users who can't even see that it is disabled because of poor lighting conditions or other reasons.\n\nPlease consider more informative alternatives before choosing to use disabled on an element.",
8090
+ "summary": "Makes the element not focusable and hides it from form submits",
8070
8091
  "attribute": "disabled",
8071
8092
  "reflects": true
8072
8093
  },
@@ -8077,6 +8098,7 @@
8077
8098
  "text": "boolean"
8078
8099
  },
8079
8100
  "default": "false",
8101
+ "description": "Mark the form field as invalid.\n\nMake sure to also set a `help-text` to help users fix the validation problem.",
8080
8102
  "attribute": "invalid",
8081
8103
  "reflects": true
8082
8104
  },
@@ -8086,6 +8108,7 @@
8086
8108
  "type": {
8087
8109
  "text": "string"
8088
8110
  },
8111
+ "description": "Either a `label` or an `aria-label` must be provided.",
8089
8112
  "attribute": "label",
8090
8113
  "reflects": true
8091
8114
  },
@@ -8095,6 +8118,8 @@
8095
8118
  "type": {
8096
8119
  "text": "string"
8097
8120
  },
8121
+ "description": "Use in combination with `invalid` to show as a validation error message,\nor on its own to show a help text.",
8122
+ "summary": "Description shown below the input field",
8098
8123
  "attribute": "help-text",
8099
8124
  "reflects": true
8100
8125
  },
@@ -8104,6 +8129,7 @@
8104
8129
  "type": {
8105
8130
  "text": "number"
8106
8131
  },
8132
+ "description": "Sets the maximum number of text rows before the content starts scrolling.",
8107
8133
  "attribute": "maximum-rows",
8108
8134
  "reflects": true
8109
8135
  },
@@ -8113,6 +8139,7 @@
8113
8139
  "type": {
8114
8140
  "text": "number"
8115
8141
  },
8142
+ "description": "Sets the minimum number of text rows the textarea should display",
8116
8143
  "attribute": "minimum-rows",
8117
8144
  "reflects": true
8118
8145
  },
@@ -8122,6 +8149,7 @@
8122
8149
  "type": {
8123
8150
  "text": "string"
8124
8151
  },
8152
+ "description": "The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form",
8125
8153
  "attribute": "name",
8126
8154
  "reflects": true
8127
8155
  },
@@ -8131,6 +8159,8 @@
8131
8159
  "type": {
8132
8160
  "text": "string"
8133
8161
  },
8162
+ "description": "Set a text that is shown in the textarea when it doesn't have a value.\n\nPlaceholder text should not be used as a substitute for labeling the element with a visible label.",
8163
+ "summary": "Shown in the textarea when it doesn't have a value",
8134
8164
  "attribute": "placeholder",
8135
8165
  "reflects": true
8136
8166
  },
@@ -8141,7 +8171,7 @@
8141
8171
  "text": "boolean"
8142
8172
  },
8143
8173
  "default": "false",
8144
- "deprecated": "Use the native readonly attribute instead. Here for API consistency with `w-textfield`.",
8174
+ "deprecated": "Use the native `readonly` attribute instead",
8145
8175
  "attribute": "read-only",
8146
8176
  "reflects": true
8147
8177
  },
@@ -8152,6 +8182,7 @@
8152
8182
  "text": "boolean"
8153
8183
  },
8154
8184
  "default": "false",
8185
+ "description": "Whether the input can be selected but not changed by the user",
8155
8186
  "attribute": "readonly",
8156
8187
  "reflects": true
8157
8188
  },
@@ -8162,6 +8193,7 @@
8162
8193
  "text": "boolean"
8163
8194
  },
8164
8195
  "default": "false",
8196
+ "description": "Whether user input is required on the input before form submission",
8165
8197
  "attribute": "required",
8166
8198
  "reflects": true
8167
8199
  },
@@ -8171,6 +8203,7 @@
8171
8203
  "type": {
8172
8204
  "text": "string"
8173
8205
  },
8206
+ "description": "Lets you set the current value",
8174
8207
  "attribute": "value",
8175
8208
  "reflects": true
8176
8209
  },
@@ -8181,17 +8214,10 @@
8181
8214
  "text": "boolean"
8182
8215
  },
8183
8216
  "default": "false",
8217
+ "description": "Show an icon behind the label indicating the field is optional",
8184
8218
  "attribute": "optional",
8185
8219
  "reflects": true
8186
8220
  },
8187
- {
8188
- "kind": "field",
8189
- "name": "minHeight"
8190
- },
8191
- {
8192
- "kind": "field",
8193
- "name": "maxHeight"
8194
- },
8195
8221
  {
8196
8222
  "kind": "field",
8197
8223
  "name": "_textarea",
@@ -8355,6 +8381,8 @@
8355
8381
  "text": "boolean"
8356
8382
  },
8357
8383
  "default": "false",
8384
+ "description": "Keep in mind that using disabled in its current form is an anti-pattern.\n\nThere will always be users who don't understand why an element is disabled, or users who can't even see that it is disabled because of poor lighting conditions or other reasons.\n\nPlease consider more informative alternatives before choosing to use disabled on an element.",
8385
+ "summary": "Makes the element not focusable and hides it from form submits",
8358
8386
  "fieldName": "disabled"
8359
8387
  },
8360
8388
  {
@@ -8363,6 +8391,7 @@
8363
8391
  "text": "boolean"
8364
8392
  },
8365
8393
  "default": "false",
8394
+ "description": "Mark the form field as invalid.\n\nMake sure to also set a `help-text` to help users fix the validation problem.",
8366
8395
  "fieldName": "invalid"
8367
8396
  },
8368
8397
  {
@@ -8370,6 +8399,7 @@
8370
8399
  "type": {
8371
8400
  "text": "string"
8372
8401
  },
8402
+ "description": "Either a `label` or an `aria-label` must be provided.",
8373
8403
  "fieldName": "label"
8374
8404
  },
8375
8405
  {
@@ -8377,6 +8407,8 @@
8377
8407
  "type": {
8378
8408
  "text": "string"
8379
8409
  },
8410
+ "description": "Use in combination with `invalid` to show as a validation error message,\nor on its own to show a help text.",
8411
+ "summary": "Description shown below the input field",
8380
8412
  "fieldName": "helpText"
8381
8413
  },
8382
8414
  {
@@ -8384,6 +8416,7 @@
8384
8416
  "type": {
8385
8417
  "text": "number"
8386
8418
  },
8419
+ "description": "Sets the maximum number of text rows before the content starts scrolling.",
8387
8420
  "fieldName": "maxRows"
8388
8421
  },
8389
8422
  {
@@ -8391,6 +8424,7 @@
8391
8424
  "type": {
8392
8425
  "text": "number"
8393
8426
  },
8427
+ "description": "Sets the minimum number of text rows the textarea should display",
8394
8428
  "fieldName": "minRows"
8395
8429
  },
8396
8430
  {
@@ -8398,6 +8432,7 @@
8398
8432
  "type": {
8399
8433
  "text": "string"
8400
8434
  },
8435
+ "description": "The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the input field when submitting the form",
8401
8436
  "fieldName": "name"
8402
8437
  },
8403
8438
  {
@@ -8405,6 +8440,8 @@
8405
8440
  "type": {
8406
8441
  "text": "string"
8407
8442
  },
8443
+ "description": "Set a text that is shown in the textarea when it doesn't have a value.\n\nPlaceholder text should not be used as a substitute for labeling the element with a visible label.",
8444
+ "summary": "Shown in the textarea when it doesn't have a value",
8408
8445
  "fieldName": "placeholder"
8409
8446
  },
8410
8447
  {
@@ -8413,7 +8450,7 @@
8413
8450
  "text": "boolean"
8414
8451
  },
8415
8452
  "default": "false",
8416
- "deprecated": "Use the native readonly attribute instead. Here for API consistency with `w-textfield`.",
8453
+ "deprecated": "Use the native `readonly` attribute instead",
8417
8454
  "fieldName": "readOnly"
8418
8455
  },
8419
8456
  {
@@ -8422,6 +8459,7 @@
8422
8459
  "text": "boolean"
8423
8460
  },
8424
8461
  "default": "false",
8462
+ "description": "Whether the input can be selected but not changed by the user",
8425
8463
  "fieldName": "readonly"
8426
8464
  },
8427
8465
  {
@@ -8430,6 +8468,7 @@
8430
8468
  "text": "boolean"
8431
8469
  },
8432
8470
  "default": "false",
8471
+ "description": "Whether user input is required on the input before form submission",
8433
8472
  "fieldName": "required"
8434
8473
  },
8435
8474
  {
@@ -8437,6 +8476,7 @@
8437
8476
  "type": {
8438
8477
  "text": "string"
8439
8478
  },
8479
+ "description": "Lets you set the current value",
8440
8480
  "fieldName": "value"
8441
8481
  },
8442
8482
  {
@@ -8445,6 +8485,7 @@
8445
8485
  "text": "boolean"
8446
8486
  },
8447
8487
  "default": "false",
8488
+ "description": "Show an icon behind the label indicating the field is optional",
8448
8489
  "fieldName": "optional"
8449
8490
  }
8450
8491
  ],
@@ -68,58 +68,46 @@ When `search` or `clear` is enabled, `w-affix` renders a button and a matching `
68
68
 
69
69
  ### Prefix Label
70
70
 
71
- <style-isolate>
72
- <w-textfield label="Price">
73
- <w-affix slot="prefix" label="kr"></w-affix>
74
- </w-textfield>
75
- </style-isolate>
76
-
71
+ <elements-example>
72
+
77
73
  ```html
78
74
  <w-textfield label="Price">
79
75
  <w-affix slot="suffix" label="kr"></w-affix>
80
76
  </w-textfield>
81
77
  ```
82
78
 
83
- ### Suffix Label
79
+ </elements-example>
84
80
 
85
- <style-isolate>
86
- <w-textfield label="Price">
87
- <w-affix slot="suffix" label="kr"></w-affix>
88
- </w-textfield>
89
- </style-isolate>
81
+ ### Suffix Label
90
82
 
83
+ <elements-example>
84
+
91
85
  ```html
92
86
  <w-textfield label="Price">
93
87
  <w-affix slot="suffix" label="kr"></w-affix>
94
88
  </w-textfield>
95
89
  ```
96
90
 
97
- ### Prefix Search Icon
91
+ </elements-example>
98
92
 
99
- <style-isolate>
100
- <w-textfield label="Search">
101
- <w-affix slot="prefix" search></w-affix>
102
- </w-textfield>
103
- </style-isolate>
93
+ ### Prefix Search Icon
104
94
 
95
+ <elements-example>
96
+
105
97
  ```html
106
98
  <w-textfield label="Search">
107
99
  <w-affix slot="prefix" search></w-affix>
108
100
  </w-textfield>
109
101
  ```
110
102
 
103
+ </elements-example>
104
+
111
105
  ### Suffix Search Icon
112
106
 
113
107
  If you wrap the textfield with affix in a form element, clicking the search button will automatically submit the form
114
108
 
115
- <style-isolate>
116
- <form>
117
- <w-textfield label="Search">
118
- <w-affix slot="suffix" search></w-affix>
119
- </w-textfield>
120
- </form>
121
- </style-isolate>
122
-
109
+ <elements-example>
110
+
123
111
  ```html
124
112
  <form>
125
113
  <w-textfield label="Search">
@@ -128,36 +116,34 @@ If you wrap the textfield with affix in a form element, clicking the search butt
128
116
  </form>
129
117
  ```
130
118
 
119
+ </elements-example>
120
+
131
121
  ### Suffix Clear Icon
132
122
 
133
123
  Clicking the clear button will reset the textfield
134
124
 
135
- <style-isolate>
136
- <w-textfield label="Search input">
137
- <w-affix slot="suffix" clear></w-affix>
138
- </w-textfield>
139
- </style-isolate>
140
-
125
+ <elements-example>
126
+
141
127
  ```html
142
128
  <w-textfield label="Search input">
143
129
  <w-affix slot="suffix" clear></w-affix>
144
130
  </w-textfield>
145
131
  ```
146
132
 
147
- ### Icons
133
+ </elements-example>
148
134
 
149
- <style-isolate>
150
- <w-textfield label="Award">
151
- <w-affix slot="prefix" icon="AwardMedal"></w-affix>
152
- </w-textfield>
153
- </style-isolate>
135
+ ### Icons
154
136
 
137
+ <elements-example>
138
+
155
139
  ```html
156
140
  <w-textfield label="Award">
157
141
  <w-affix slot="prefix" icon="AwardMedal"></w-affix>
158
142
  </w-textfield>
159
143
  ```
160
144
 
145
+ </elements-example>
146
+
161
147
  ## API Documentation
162
148
 
163
149
  ### Properties
@@ -2,58 +2,46 @@
2
2
 
3
3
  ### Prefix Label
4
4
 
5
- <style-isolate>
6
- <w-textfield label="Price">
7
- <w-affix slot="prefix" label="kr"></w-affix>
8
- </w-textfield>
9
- </style-isolate>
10
-
5
+ <elements-example>
6
+
11
7
  ```html
12
8
  <w-textfield label="Price">
13
9
  <w-affix slot="suffix" label="kr"></w-affix>
14
10
  </w-textfield>
15
11
  ```
16
12
 
17
- ### Suffix Label
13
+ </elements-example>
18
14
 
19
- <style-isolate>
20
- <w-textfield label="Price">
21
- <w-affix slot="suffix" label="kr"></w-affix>
22
- </w-textfield>
23
- </style-isolate>
15
+ ### Suffix Label
24
16
 
17
+ <elements-example>
18
+
25
19
  ```html
26
20
  <w-textfield label="Price">
27
21
  <w-affix slot="suffix" label="kr"></w-affix>
28
22
  </w-textfield>
29
23
  ```
30
24
 
31
- ### Prefix Search Icon
25
+ </elements-example>
32
26
 
33
- <style-isolate>
34
- <w-textfield label="Search">
35
- <w-affix slot="prefix" search></w-affix>
36
- </w-textfield>
37
- </style-isolate>
27
+ ### Prefix Search Icon
38
28
 
29
+ <elements-example>
30
+
39
31
  ```html
40
32
  <w-textfield label="Search">
41
33
  <w-affix slot="prefix" search></w-affix>
42
34
  </w-textfield>
43
35
  ```
44
36
 
37
+ </elements-example>
38
+
45
39
  ### Suffix Search Icon
46
40
 
47
41
  If you wrap the textfield with affix in a form element, clicking the search button will automatically submit the form
48
42
 
49
- <style-isolate>
50
- <form>
51
- <w-textfield label="Search">
52
- <w-affix slot="suffix" search></w-affix>
53
- </w-textfield>
54
- </form>
55
- </style-isolate>
56
-
43
+ <elements-example>
44
+
57
45
  ```html
58
46
  <form>
59
47
  <w-textfield label="Search">
@@ -62,32 +50,30 @@ If you wrap the textfield with affix in a form element, clicking the search butt
62
50
  </form>
63
51
  ```
64
52
 
53
+ </elements-example>
54
+
65
55
  ### Suffix Clear Icon
66
56
 
67
57
  Clicking the clear button will reset the textfield
68
58
 
69
- <style-isolate>
70
- <w-textfield label="Search input">
71
- <w-affix slot="suffix" clear></w-affix>
72
- </w-textfield>
73
- </style-isolate>
74
-
59
+ <elements-example>
60
+
75
61
  ```html
76
62
  <w-textfield label="Search input">
77
63
  <w-affix slot="suffix" clear></w-affix>
78
64
  </w-textfield>
79
65
  ```
80
66
 
81
- ### Icons
67
+ </elements-example>
82
68
 
83
- <style-isolate>
84
- <w-textfield label="Award">
85
- <w-affix slot="prefix" icon="AwardMedal"></w-affix>
86
- </w-textfield>
87
- </style-isolate>
69
+ ### Icons
88
70
 
71
+ <elements-example>
72
+
89
73
  ```html
90
74
  <w-textfield label="Award">
91
75
  <w-affix slot="prefix" icon="AwardMedal"></w-affix>
92
76
  </w-textfield>
93
77
  ```
78
+
79
+ </elements-example>