@warp-ds/elements 2.8.1-next.4 → 2.8.1-next.5

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.
@@ -4425,7 +4425,8 @@
4425
4425
  },
4426
4426
  "default": "false",
4427
4427
  "description": "Disables the radio.",
4428
- "attribute": "disabled"
4428
+ "attribute": "disabled",
4429
+ "reflects": true
4429
4430
  },
4430
4431
  {
4431
4432
  "kind": "field",
@@ -4809,7 +4810,6 @@
4809
4810
  "text": "string"
4810
4811
  },
4811
4812
  "default": "''",
4812
- "description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
4813
4813
  "attribute": "label"
4814
4814
  },
4815
4815
  {
@@ -4819,7 +4819,6 @@
4819
4819
  "text": "string"
4820
4820
  },
4821
4821
  "default": "''",
4822
- "description": "The radio group's help text. If you need to display HTML, use the `help-text` slot instead.",
4823
4822
  "attribute": "help-text"
4824
4823
  },
4825
4824
  {
@@ -4829,7 +4828,6 @@
4829
4828
  "text": "boolean"
4830
4829
  },
4831
4830
  "default": "false",
4832
- "description": "Optional indicator for the label.",
4833
4831
  "attribute": "optional",
4834
4832
  "reflects": true
4835
4833
  },
@@ -4840,7 +4838,6 @@
4840
4838
  "text": "boolean"
4841
4839
  },
4842
4840
  "default": "false",
4843
- "description": "Marks the radio group as invalid.",
4844
4841
  "attribute": "invalid",
4845
4842
  "reflects": true
4846
4843
  },
@@ -4851,7 +4848,6 @@
4851
4848
  "text": "string | null"
4852
4849
  },
4853
4850
  "default": "null",
4854
- "description": "The name of the radio group",
4855
4851
  "attribute": "name",
4856
4852
  "reflects": true
4857
4853
  },
@@ -4862,7 +4858,6 @@
4862
4858
  "text": "boolean"
4863
4859
  },
4864
4860
  "default": "false",
4865
- "description": "Disables the radio group and all child radios.",
4866
4861
  "attribute": "disabled",
4867
4862
  "reflects": true
4868
4863
  },
@@ -4873,7 +4868,6 @@
4873
4868
  "text": "boolean"
4874
4869
  },
4875
4870
  "default": "false",
4876
- "description": "Ensures a child radio is checked before allowing the containing form to submit.",
4877
4871
  "attribute": "required",
4878
4872
  "reflects": true
4879
4873
  },
@@ -4929,7 +4923,6 @@
4929
4923
  {
4930
4924
  "kind": "field",
4931
4925
  "name": "validationTarget",
4932
- "description": "We use the first available radio as the validationTarget similar to native HTML that shows the validation popup on\nthe first radio element.",
4933
4926
  "readonly": true
4934
4927
  },
4935
4928
  {
@@ -5084,7 +5077,6 @@
5084
5077
  }
5085
5078
  }
5086
5079
  ],
5087
- "description": "Sets focus on the radio group.",
5088
5080
  "type": {
5089
5081
  "text": "focus(options?: FocusOptions) => void"
5090
5082
  }
@@ -5201,7 +5193,6 @@
5201
5193
  "text": "string"
5202
5194
  },
5203
5195
  "default": "''",
5204
- "description": "The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot\ninstead.",
5205
5196
  "fieldName": "label"
5206
5197
  },
5207
5198
  {
@@ -5210,7 +5201,6 @@
5210
5201
  "text": "string"
5211
5202
  },
5212
5203
  "default": "''",
5213
- "description": "The radio group's help text. If you need to display HTML, use the `help-text` slot instead.",
5214
5204
  "fieldName": "helpText"
5215
5205
  },
5216
5206
  {
@@ -5219,7 +5209,6 @@
5219
5209
  "text": "boolean"
5220
5210
  },
5221
5211
  "default": "false",
5222
- "description": "Optional indicator for the label.",
5223
5212
  "fieldName": "optional"
5224
5213
  },
5225
5214
  {
@@ -5228,7 +5217,6 @@
5228
5217
  "text": "boolean"
5229
5218
  },
5230
5219
  "default": "false",
5231
- "description": "Marks the radio group as invalid.",
5232
5220
  "fieldName": "invalid"
5233
5221
  },
5234
5222
  {
@@ -5237,7 +5225,6 @@
5237
5225
  "text": "string | null"
5238
5226
  },
5239
5227
  "default": "null",
5240
- "description": "The name of the radio group",
5241
5228
  "fieldName": "name"
5242
5229
  },
5243
5230
  {
@@ -5246,7 +5233,6 @@
5246
5233
  "text": "boolean"
5247
5234
  },
5248
5235
  "default": "false",
5249
- "description": "Disables the radio group and all child radios.",
5250
5236
  "fieldName": "disabled"
5251
5237
  },
5252
5238
  {
@@ -5255,7 +5241,6 @@
5255
5241
  "text": "boolean"
5256
5242
  },
5257
5243
  "default": "false",
5258
- "description": "Ensures a child radio is checked before allowing the containing form to submit.",
5259
5244
  "fieldName": "required"
5260
5245
  }
5261
5246
  ],
package/dist/index.d.ts CHANGED
@@ -1148,44 +1148,42 @@ export type WRadioSolidJsProps = {
1148
1148
  };
1149
1149
 
1150
1150
  export type WRadioGroupProps = {
1151
- /** The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
1152
- instead. */
1151
+ /** */
1153
1152
  label?: WRadioGroup["label"];
1154
- /** The radio group's help text. If you need to display HTML, use the `help-text` slot instead. */
1153
+ /** */
1155
1154
  "help-text"?: WRadioGroup["helpText"];
1156
- /** The radio group's help text. If you need to display HTML, use the `help-text` slot instead. */
1155
+ /** */
1157
1156
  helpText?: WRadioGroup["helpText"];
1158
- /** Optional indicator for the label. */
1157
+ /** */
1159
1158
  optional?: WRadioGroup["optional"];
1160
- /** Marks the radio group as invalid. */
1159
+ /** */
1161
1160
  invalid?: WRadioGroup["invalid"];
1162
- /** The name of the radio group */
1161
+ /** */
1163
1162
  name?: WRadioGroup["name"];
1164
- /** Disables the radio group and all child radios. */
1163
+ /** */
1165
1164
  disabled?: WRadioGroup["disabled"];
1166
- /** Ensures a child radio is checked before allowing the containing form to submit. */
1165
+ /** */
1167
1166
  required?: WRadioGroup["required"];
1168
1167
  /** */
1169
1168
  hasInteracted?: WRadioGroup["hasInteracted"];
1170
1169
  };
1171
1170
 
1172
1171
  export type WRadioGroupSolidJsProps = {
1173
- /** The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
1174
- instead. */
1172
+ /** */
1175
1173
  "prop:label"?: WRadioGroup["label"];
1176
- /** The radio group's help text. If you need to display HTML, use the `help-text` slot instead. */
1174
+ /** */
1177
1175
  "attr:help-text"?: WRadioGroup["helpText"];
1178
- /** The radio group's help text. If you need to display HTML, use the `help-text` slot instead. */
1176
+ /** */
1179
1177
  "prop:helpText"?: WRadioGroup["helpText"];
1180
- /** Optional indicator for the label. */
1178
+ /** */
1181
1179
  "prop:optional"?: WRadioGroup["optional"];
1182
- /** Marks the radio group as invalid. */
1180
+ /** */
1183
1181
  "prop:invalid"?: WRadioGroup["invalid"];
1184
- /** The name of the radio group */
1182
+ /** */
1185
1183
  "prop:name"?: WRadioGroup["name"];
1186
- /** Disables the radio group and all child radios. */
1184
+ /** */
1187
1185
  "prop:disabled"?: WRadioGroup["disabled"];
1188
- /** Ensures a child radio is checked before allowing the containing form to submit. */
1186
+ /** */
1189
1187
  "prop:required"?: WRadioGroup["required"];
1190
1188
  /** */
1191
1189
  "prop:hasInteracted"?: WRadioGroup["hasInteracted"];
@@ -2392,17 +2390,15 @@ export type CustomElements = {
2392
2390
  *
2393
2391
  * Component attributes and properties that can be applied to the element or by using JavaScript.
2394
2392
  *
2395
- * - `label`: The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
2396
- * instead.
2397
- * - `help-text`/`helpText`: The radio group's help text. If you need to display HTML, use the `help-text` slot instead.
2398
- * - `optional`: Optional indicator for the label.
2399
- * - `invalid`: Marks the radio group as invalid.
2400
- * - `name`: The name of the radio group
2401
- * - `disabled`: Disables the radio group and all child radios.
2402
- * - `required`: Ensures a child radio is checked before allowing the containing form to submit.
2393
+ * - `label`: undefined
2394
+ * - `help-text`/`helpText`: undefined
2395
+ * - `optional`: undefined
2396
+ * - `invalid`: undefined
2397
+ * - `name`: undefined
2398
+ * - `disabled`: undefined
2399
+ * - `required`: undefined
2403
2400
  * - `hasInteracted`: undefined (property only)
2404
- * - `validationTarget`: We use the first available radio as the validationTarget similar to native HTML that shows the validation popup on
2405
- * the first radio element. (property only) (readonly)
2401
+ * - `validationTarget`: undefined (property only) (readonly)
2406
2402
  *
2407
2403
  * ## Slots
2408
2404
  *
@@ -2416,7 +2412,7 @@ export type CustomElements = {
2416
2412
  * Methods that can be called to access component functionality.
2417
2413
  *
2418
2414
  * - `resetFormControl() => void`: undefined
2419
- * - `focus(options?: FocusOptions) => void`: Sets focus on the radio group.
2415
+ * - `focus(options?: FocusOptions) => void`: undefined
2420
2416
  * - `checkValidity() => void`: undefined
2421
2417
  * - `reportValidity() => void`: undefined
2422
2418
  */
@@ -3424,17 +3420,15 @@ export type CustomElementsSolidJs = {
3424
3420
  *
3425
3421
  * Component attributes and properties that can be applied to the element or by using JavaScript.
3426
3422
  *
3427
- * - `label`: The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
3428
- * instead.
3429
- * - `help-text`/`helpText`: The radio group's help text. If you need to display HTML, use the `help-text` slot instead.
3430
- * - `optional`: Optional indicator for the label.
3431
- * - `invalid`: Marks the radio group as invalid.
3432
- * - `name`: The name of the radio group
3433
- * - `disabled`: Disables the radio group and all child radios.
3434
- * - `required`: Ensures a child radio is checked before allowing the containing form to submit.
3423
+ * - `label`: undefined
3424
+ * - `help-text`/`helpText`: undefined
3425
+ * - `optional`: undefined
3426
+ * - `invalid`: undefined
3427
+ * - `name`: undefined
3428
+ * - `disabled`: undefined
3429
+ * - `required`: undefined
3435
3430
  * - `hasInteracted`: undefined (property only)
3436
- * - `validationTarget`: We use the first available radio as the validationTarget similar to native HTML that shows the validation popup on
3437
- * the first radio element. (property only) (readonly)
3431
+ * - `validationTarget`: undefined (property only) (readonly)
3438
3432
  *
3439
3433
  * ## Slots
3440
3434
  *
@@ -3448,7 +3442,7 @@ export type CustomElementsSolidJs = {
3448
3442
  * Methods that can be called to access component functionality.
3449
3443
  *
3450
3444
  * - `resetFormControl() => void`: undefined
3451
- * - `focus(options?: FocusOptions) => void`: Sets focus on the radio group.
3445
+ * - `focus(options?: FocusOptions) => void`: undefined
3452
3446
  * - `checkValidity() => void`: undefined
3453
3447
  * - `reportValidity() => void`: undefined
3454
3448
  */
@@ -40,6 +40,7 @@ export const styles = css `
40
40
  );
41
41
  }
42
42
 
43
+ :host([disabled]),
43
44
  :host([disabled-ui]) {
44
45
  --w-c-radio-border-color: var(--w-c-radio-border-color-disabled, var(--w-s-color-border-disabled));
45
46
  --w-c-radio-bg: var(--w-c-radio-bg-disabled, var(--w-s-color-background-disabled-subtle));
@@ -72,6 +73,7 @@ export const styles = css `
72
73
  transition: var(--_transition);
73
74
  }
74
75
 
76
+ :host([checked]) [part='control'],
75
77
  :host([checked-ui]) [part='control'],
76
78
  :host([role='radio'][checked-ui]) [part='control'],
77
79
  :host([role='radio']:state(checked)) [part='control'] {
@@ -92,6 +94,7 @@ export const styles = css `
92
94
  outline-offset: var(--_outline-offset);
93
95
  }
94
96
 
97
+ :host([disabled]) [part='control'],
95
98
  :host([disabled-ui]) [part='control'],
96
99
  :host([role='radio']:state(disabled)) [part='control'] {
97
100
  border-color: var(--_border-color-disabled);
@@ -99,6 +102,14 @@ export const styles = css `
99
102
  cursor: var(--_cursor-disabled);
100
103
  }
101
104
 
105
+ :host([disabled]) [part='label'],
106
+ :host([disabled-ui]) [part='label'] {
107
+ color: var(--_label-color-disabled);
108
+ cursor: var(--_cursor-disabled);
109
+ }
110
+
111
+ :host([disabled][checked]),
112
+ :host([disabled][checked-ui]),
102
113
  :host([disabled-ui][checked-ui]) [part='control'] {
103
114
  border-color: var(--_border-color-disabled);
104
115
  }
@@ -133,12 +144,15 @@ export const styles = css `
133
144
  forced-color-adjust: none;
134
145
  }
135
146
 
147
+ :host([checked]) [part='control'],
136
148
  :host([checked-ui]) [part='control'],
137
149
  :host([role='radio']:state(checked)) [part='control'] {
138
150
  background-color: var(--_border-color-checked);
139
151
  border-color: var(--_border-color-checked);
140
152
  }
141
153
 
154
+ :host([disabled][checked]),
155
+ :host([disabled][checked-ui]),
142
156
  :host([disabled-ui][checked-ui]) [part='control'],
143
157
  :host([role='radio']:state(disabled):state(checked)) [part='control'] {
144
158
  background-color: var(--_border-color-disabled);
@@ -2488,6 +2488,7 @@ var ee=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var D=i=>{th
2488
2488
  );
2489
2489
  }
2490
2490
 
2491
+ :host([disabled]),
2491
2492
  :host([disabled-ui]) {
2492
2493
  --w-c-radio-border-color: var(--w-c-radio-border-color-disabled, var(--w-s-color-border-disabled));
2493
2494
  --w-c-radio-bg: var(--w-c-radio-bg-disabled, var(--w-s-color-background-disabled-subtle));
@@ -2520,6 +2521,7 @@ var ee=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var D=i=>{th
2520
2521
  transition: var(--_transition);
2521
2522
  }
2522
2523
 
2524
+ :host([checked]) [part='control'],
2523
2525
  :host([checked-ui]) [part='control'],
2524
2526
  :host([role='radio'][checked-ui]) [part='control'],
2525
2527
  :host([role='radio']:state(checked)) [part='control'] {
@@ -2540,6 +2542,7 @@ var ee=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var D=i=>{th
2540
2542
  outline-offset: var(--_outline-offset);
2541
2543
  }
2542
2544
 
2545
+ :host([disabled]) [part='control'],
2543
2546
  :host([disabled-ui]) [part='control'],
2544
2547
  :host([role='radio']:state(disabled)) [part='control'] {
2545
2548
  border-color: var(--_border-color-disabled);
@@ -2547,6 +2550,14 @@ var ee=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var D=i=>{th
2547
2550
  cursor: var(--_cursor-disabled);
2548
2551
  }
2549
2552
 
2553
+ :host([disabled]) [part='label'],
2554
+ :host([disabled-ui]) [part='label'] {
2555
+ color: var(--_label-color-disabled);
2556
+ cursor: var(--_cursor-disabled);
2557
+ }
2558
+
2559
+ :host([disabled][checked]),
2560
+ :host([disabled][checked-ui]),
2550
2561
  :host([disabled-ui][checked-ui]) [part='control'] {
2551
2562
  border-color: var(--_border-color-disabled);
2552
2563
  }
@@ -2581,12 +2592,15 @@ var ee=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var D=i=>{th
2581
2592
  forced-color-adjust: none;
2582
2593
  }
2583
2594
 
2595
+ :host([checked]) [part='control'],
2584
2596
  :host([checked-ui]) [part='control'],
2585
2597
  :host([role='radio']:state(checked)) [part='control'] {
2586
2598
  background-color: var(--_border-color-checked);
2587
2599
  border-color: var(--_border-color-checked);
2588
2600
  }
2589
2601
 
2602
+ :host([disabled][checked]),
2603
+ :host([disabled][checked-ui]),
2590
2604
  :host([disabled-ui][checked-ui]) [part='control'],
2591
2605
  :host([role='radio']:state(disabled):state(checked)) [part='control'] {
2592
2606
  background-color: var(--_border-color-disabled);
@@ -2598,5 +2612,5 @@ var ee=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var D=i=>{th
2598
2612
  <div part="control" class="control"></div>
2599
2613
  <slot part="label" class="label"></slot>
2600
2614
  </div>
2601
- `}};M=new WeakMap,V=new WeakMap,y=new WeakMap,_=new WeakMap,w.styles=[K,H,J],C([A({reflect:!0})],w.prototype,"name",2),C([A({reflect:!0})],w.prototype,"value",2),C([A({type:Boolean,reflect:!0})],w.prototype,"checked",2),C([A({type:Boolean})],w.prototype,"disabled",2),C([A({type:Boolean,reflect:!0})],w.prototype,"required",2),C([A({type:Boolean,reflect:!0})],w.prototype,"invalid",2);customElements.get("w-radio")||customElements.define("w-radio",w);export{w as WRadio};
2615
+ `}};M=new WeakMap,V=new WeakMap,y=new WeakMap,_=new WeakMap,w.styles=[K,H,J],C([A({reflect:!0})],w.prototype,"name",2),C([A({reflect:!0})],w.prototype,"value",2),C([A({type:Boolean,reflect:!0})],w.prototype,"checked",2),C([A({type:Boolean,reflect:!0})],w.prototype,"disabled",2),C([A({type:Boolean,reflect:!0})],w.prototype,"required",2),C([A({type:Boolean,reflect:!0})],w.prototype,"invalid",2);customElements.get("w-radio")||customElements.define("w-radio",w);export{w as WRadio};
2602
2616
  //# sourceMappingURL=radio.js.map