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

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 (47) hide show
  1. package/dist/custom-elements.json +800 -0
  2. package/dist/index.d.ts +341 -0
  3. package/dist/packages/slider/Slider.d.ts +2 -0
  4. package/dist/packages/slider/Slider.js +8 -0
  5. package/dist/packages/slider/index.d.ts +2 -0
  6. package/dist/packages/slider/index.js +2 -0
  7. package/dist/packages/slider/locales/da/messages.d.mts +1 -0
  8. package/dist/packages/slider/locales/da/messages.mjs +1 -0
  9. package/dist/packages/slider/locales/en/messages.d.mts +1 -0
  10. package/dist/packages/slider/locales/en/messages.mjs +1 -0
  11. package/dist/packages/slider/locales/fi/messages.d.mts +1 -0
  12. package/dist/packages/slider/locales/fi/messages.mjs +1 -0
  13. package/dist/packages/slider/locales/nb/messages.d.mts +1 -0
  14. package/dist/packages/slider/locales/nb/messages.mjs +1 -0
  15. package/dist/packages/slider/locales/sv/messages.d.mts +1 -0
  16. package/dist/packages/slider/locales/sv/messages.mjs +1 -0
  17. package/dist/packages/slider/react.d.ts +3 -0
  18. package/dist/packages/slider/react.js +13 -0
  19. package/dist/packages/slider/slider.d.ts +64 -0
  20. package/dist/packages/slider/slider.js +2641 -0
  21. package/dist/packages/slider/slider.js.map +7 -0
  22. package/dist/packages/slider/slider.react.stories.d.ts +19 -0
  23. package/dist/packages/slider/slider.react.stories.js +161 -0
  24. package/dist/packages/slider/slider.stories.d.ts +26 -0
  25. package/dist/packages/slider/slider.stories.js +464 -0
  26. package/dist/packages/slider/slider.test.d.ts +5 -0
  27. package/dist/packages/slider/slider.test.js +380 -0
  28. package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
  29. package/dist/packages/slider/styles/w-slider.styles.js +154 -0
  30. package/dist/packages/slider/styles.d.ts +1 -0
  31. package/dist/packages/slider/styles.js +2 -0
  32. package/dist/packages/slider-thumb/SliderThumb.d.ts +2 -0
  33. package/dist/packages/slider-thumb/SliderThumb.js +8 -0
  34. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.d.ts +2 -0
  35. package/dist/packages/slider-thumb/oddbird-css-anchor-positioning.js +3 -0
  36. package/dist/packages/slider-thumb/react.d.ts +6 -0
  37. package/dist/packages/slider-thumb/react.js +15 -0
  38. package/dist/packages/slider-thumb/slider-thumb.d.ts +72 -0
  39. package/dist/packages/slider-thumb/slider-thumb.js +2774 -0
  40. package/dist/packages/slider-thumb/slider-thumb.js.map +7 -0
  41. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.d.ts +1 -0
  42. package/dist/packages/slider-thumb/styles/w-slider-thumb.styles.js +194 -0
  43. package/dist/packages/textfield/styles/w-textfield.styles.js +6 -0
  44. package/dist/packages/textfield/textfield.js +7 -1
  45. package/dist/packages/textfield/textfield.js.map +2 -2
  46. package/dist/web-types.json +169 -1
  47. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -27,6 +27,8 @@ 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 { WarpSliderThumb } from "./packages/slider-thumb/slider-thumb.ts";
31
+ import type { WarpSlider } from "./packages/slider/slider.ts";
30
32
 
31
33
  /**
32
34
  * This type can be used to create scoped tags for your components.
@@ -1441,6 +1443,165 @@ export type WarpToastContainerSolidJsProps = {
1441
1443
  textContent?: string | number;
1442
1444
  };
1443
1445
 
1446
+ export type WarpSliderThumbProps = {
1447
+ /** */
1448
+ "aria-label"?: WarpSliderThumb["ariaLabel"];
1449
+ /** */
1450
+ ariaLabel?: WarpSliderThumb["ariaLabel"];
1451
+ /** */
1452
+ "aria-description"?: WarpSliderThumb["ariaDescription"];
1453
+ /** */
1454
+ ariaDescription?: WarpSliderThumb["ariaDescription"];
1455
+ /** */
1456
+ name?: WarpSliderThumb["name"];
1457
+ /** */
1458
+ value?: WarpSliderThumb["value"];
1459
+ /** */
1460
+ placeholder?: WarpSliderThumb["placeholder"];
1461
+ /** */
1462
+ range?: WarpSliderThumb["range"];
1463
+ /** */
1464
+ tooltipTarget?: WarpSliderThumb["tooltipTarget"];
1465
+ /** */
1466
+ textfield?: WarpSliderThumb["textfield"];
1467
+
1468
+ /** */
1469
+ onslidervalidity?: (e: CustomEvent) => void;
1470
+ };
1471
+
1472
+ export type WarpSliderThumbSolidJsProps = {
1473
+ /** */
1474
+ "attr:aria-label"?: WarpSliderThumb["ariaLabel"];
1475
+ /** */
1476
+ "prop:ariaLabel"?: WarpSliderThumb["ariaLabel"];
1477
+ /** */
1478
+ "attr:aria-description"?: WarpSliderThumb["ariaDescription"];
1479
+ /** */
1480
+ "prop:ariaDescription"?: WarpSliderThumb["ariaDescription"];
1481
+ /** */
1482
+ "prop:name"?: WarpSliderThumb["name"];
1483
+ /** */
1484
+ "prop:value"?: WarpSliderThumb["value"];
1485
+ /** */
1486
+ "prop:placeholder"?: WarpSliderThumb["placeholder"];
1487
+ /** */
1488
+ "prop:range"?: WarpSliderThumb["range"];
1489
+ /** */
1490
+ "prop:tooltipTarget"?: WarpSliderThumb["tooltipTarget"];
1491
+ /** */
1492
+ "prop:textfield"?: WarpSliderThumb["textfield"];
1493
+ /** */
1494
+ "on:slidervalidity"?: (e: CustomEvent) => void;
1495
+
1496
+ /** Set the innerHTML of the element */
1497
+ innerHTML?: string;
1498
+ /** Set the textContent of the element */
1499
+ textContent?: string | number;
1500
+ };
1501
+
1502
+ export type WarpSliderProps = {
1503
+ /** The slider fieldset label. Required for proper accessibility.
1504
+
1505
+ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`) */
1506
+ label?: WarpSlider["label"];
1507
+ /** */
1508
+ disabled?: WarpSlider["disabled"];
1509
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1510
+ "open-ended"?: WarpSlider["openEnded"];
1511
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1512
+ openEnded?: WarpSlider["openEnded"];
1513
+ /** */
1514
+ error?: WarpSlider["error"];
1515
+ /** */
1516
+ "help-text"?: WarpSlider["helpText"];
1517
+ /** */
1518
+ helpText?: WarpSlider["helpText"];
1519
+ /** */
1520
+ invalid?: WarpSlider["invalid"];
1521
+ /** Ensures a child slider thumb has a value before allowing the containing form to submit. */
1522
+ required?: WarpSlider["required"];
1523
+ /** */
1524
+ min?: WarpSlider["min"];
1525
+ /** */
1526
+ max?: WarpSlider["max"];
1527
+ /** Pass a value similar to step to create visual markers at that interval */
1528
+ markers?: WarpSlider["markers"];
1529
+ /** */
1530
+ step?: WarpSlider["step"];
1531
+ /** Suffix used in text input fields and for the min and max values of the slider. */
1532
+ suffix?: WarpSlider["suffix"];
1533
+ /** */
1534
+ "hidden-textfield"?: WarpSlider["hiddenTextfield"];
1535
+ /** */
1536
+ hiddenTextfield?: WarpSlider["hiddenTextfield"];
1537
+ /** Formatter for the tooltip and input mask values. */
1538
+ valueFormatter?: WarpSlider["valueFormatter"];
1539
+ /** Formatter for the min and max labels below the range. */
1540
+ labelFormatter?: WarpSlider["labelFormatter"];
1541
+ /** */
1542
+ _invalidMessage?: WarpSlider["_invalidMessage"];
1543
+ /** */
1544
+ _hasInternalError?: WarpSlider["_hasInternalError"];
1545
+ /** */
1546
+ _showError?: WarpSlider["_showError"];
1547
+ /** */
1548
+ _tabbableElements?: WarpSlider["_tabbableElements"];
1549
+ };
1550
+
1551
+ export type WarpSliderSolidJsProps = {
1552
+ /** The slider fieldset label. Required for proper accessibility.
1553
+
1554
+ If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`) */
1555
+ "prop:label"?: WarpSlider["label"];
1556
+ /** */
1557
+ "prop:disabled"?: WarpSlider["disabled"];
1558
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1559
+ "bool:open-ended"?: WarpSlider["openEnded"];
1560
+ /** Whether or not to allow values outside the range such as "Before 1950" and "2025+". */
1561
+ "prop:openEnded"?: WarpSlider["openEnded"];
1562
+ /** */
1563
+ "prop:error"?: WarpSlider["error"];
1564
+ /** */
1565
+ "attr:help-text"?: WarpSlider["helpText"];
1566
+ /** */
1567
+ "prop:helpText"?: WarpSlider["helpText"];
1568
+ /** */
1569
+ "prop:invalid"?: WarpSlider["invalid"];
1570
+ /** Ensures a child slider thumb has a value before allowing the containing form to submit. */
1571
+ "prop:required"?: WarpSlider["required"];
1572
+ /** */
1573
+ "prop:min"?: WarpSlider["min"];
1574
+ /** */
1575
+ "prop:max"?: WarpSlider["max"];
1576
+ /** Pass a value similar to step to create visual markers at that interval */
1577
+ "prop:markers"?: WarpSlider["markers"];
1578
+ /** */
1579
+ "prop:step"?: WarpSlider["step"];
1580
+ /** Suffix used in text input fields and for the min and max values of the slider. */
1581
+ "prop:suffix"?: WarpSlider["suffix"];
1582
+ /** */
1583
+ "bool:hidden-textfield"?: WarpSlider["hiddenTextfield"];
1584
+ /** */
1585
+ "prop:hiddenTextfield"?: WarpSlider["hiddenTextfield"];
1586
+ /** Formatter for the tooltip and input mask values. */
1587
+ "prop:valueFormatter"?: WarpSlider["valueFormatter"];
1588
+ /** Formatter for the min and max labels below the range. */
1589
+ "prop:labelFormatter"?: WarpSlider["labelFormatter"];
1590
+ /** */
1591
+ "prop:_invalidMessage"?: WarpSlider["_invalidMessage"];
1592
+ /** */
1593
+ "prop:_hasInternalError"?: WarpSlider["_hasInternalError"];
1594
+ /** */
1595
+ "prop:_showError"?: WarpSlider["_showError"];
1596
+ /** */
1597
+ "prop:_tabbableElements"?: WarpSlider["_tabbableElements"];
1598
+
1599
+ /** Set the innerHTML of the element */
1600
+ innerHTML?: string;
1601
+ /** Set the textContent of the element */
1602
+ textContent?: string | number;
1603
+ };
1604
+
1444
1605
  export type CustomElements = {
1445
1606
  /**
1446
1607
  *
@@ -2189,6 +2350,92 @@ export type CustomElements = {
2189
2350
  "w-toast-container": Partial<
2190
2351
  WarpToastContainerProps & BaseProps<WarpToastContainer> & BaseEvents
2191
2352
  >;
2353
+
2354
+ /**
2355
+ * Component to place inside a `<w-slider>`.
2356
+ *
2357
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
2358
+ *
2359
+ * ## Attributes & Properties
2360
+ *
2361
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
2362
+ *
2363
+ * - `aria-label`/`ariaLabel`: undefined
2364
+ * - `aria-description`/`ariaDescription`: undefined
2365
+ * - `name`: undefined
2366
+ * - `value`: undefined
2367
+ * - `placeholder`: undefined
2368
+ * - `range`: undefined (property only)
2369
+ * - `tooltipTarget`: undefined (property only)
2370
+ * - `textfield`: undefined (property only)
2371
+ * - `boundaryValue`: undefined (property only) (readonly)
2372
+ * - `textFieldDisplayValue`: Value to display in the textfield (shows boundary when focused on empty value) (property only) (readonly)
2373
+ * - `tooltipDisplayValue`: Value to display in the tooltip (property only) (readonly)
2374
+ * - `ariaDescriptionText`: undefined (property only) (readonly)
2375
+ *
2376
+ * ## Events
2377
+ *
2378
+ * Events that will be emitted by the component.
2379
+ *
2380
+ * - `slidervalidity`: undefined
2381
+ *
2382
+ * ## Methods
2383
+ *
2384
+ * Methods that can be called to access component functionality.
2385
+ *
2386
+ * - `resetFormControl() => void`: undefined
2387
+ * - `updateFieldAfterValidation() => void`: undefined
2388
+ */
2389
+ "w-slider-thumb": Partial<
2390
+ WarpSliderThumbProps & BaseProps<WarpSliderThumb> & BaseEvents
2391
+ >;
2392
+
2393
+ /**
2394
+ * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
2395
+ *
2396
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
2397
+ *
2398
+ * ## Attributes & Properties
2399
+ *
2400
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
2401
+ *
2402
+ * - `label`: The slider fieldset label. Required for proper accessibility.
2403
+ *
2404
+ * If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`)
2405
+ * - `disabled`: undefined
2406
+ * - `open-ended`/`openEnded`: Whether or not to allow values outside the range such as "Before 1950" and "2025+".
2407
+ * - `error`: undefined
2408
+ * - `help-text`/`helpText`: undefined
2409
+ * - `invalid`: undefined
2410
+ * - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit.
2411
+ * - `min`: undefined
2412
+ * - `max`: undefined
2413
+ * - `markers`: Pass a value similar to step to create visual markers at that interval
2414
+ * - `step`: undefined
2415
+ * - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
2416
+ * - `hidden-textfield`/`hiddenTextfield`: undefined
2417
+ * - `valueFormatter`: Formatter for the tooltip and input mask values. (property only)
2418
+ * - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
2419
+ * - `_invalidMessage`: undefined (property only)
2420
+ * - `_hasInternalError`: undefined (property only)
2421
+ * - `_showError`: undefined (property only)
2422
+ * - `_tabbableElements`: undefined (property only)
2423
+ * - `edgeMin`: undefined (property only) (readonly)
2424
+ * - `edgeMax`: undefined (property only) (readonly)
2425
+ * - `componentHasError`: undefined (property only) (readonly)
2426
+ * - `errorText`: undefined (property only) (readonly)
2427
+ *
2428
+ * ## Slots
2429
+ *
2430
+ * Areas where markup can be added to the component.
2431
+ *
2432
+ * - `(default)`: For single sliders place a `<w-slider-thumb>` in the default slot.
2433
+ * - `label`: Label for the slider or range slider as a whole.
2434
+ * - `description`: Optional description between the label and slider.
2435
+ * - `from`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
2436
+ * - `to`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
2437
+ */
2438
+ "w-slider": Partial<WarpSliderProps & BaseProps<WarpSlider> & BaseEvents>;
2192
2439
  };
2193
2440
 
2194
2441
  export type CustomElementsSolidJs = {
@@ -3020,6 +3267,100 @@ export type CustomElementsSolidJs = {
3020
3267
  BaseProps<WarpToastContainer> &
3021
3268
  BaseEvents
3022
3269
  >;
3270
+
3271
+ /**
3272
+ * Component to place inside a `<w-slider>`.
3273
+ *
3274
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
3275
+ *
3276
+ * ## Attributes & Properties
3277
+ *
3278
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
3279
+ *
3280
+ * - `aria-label`/`ariaLabel`: undefined
3281
+ * - `aria-description`/`ariaDescription`: undefined
3282
+ * - `name`: undefined
3283
+ * - `value`: undefined
3284
+ * - `placeholder`: undefined
3285
+ * - `range`: undefined (property only)
3286
+ * - `tooltipTarget`: undefined (property only)
3287
+ * - `textfield`: undefined (property only)
3288
+ * - `boundaryValue`: undefined (property only) (readonly)
3289
+ * - `textFieldDisplayValue`: Value to display in the textfield (shows boundary when focused on empty value) (property only) (readonly)
3290
+ * - `tooltipDisplayValue`: Value to display in the tooltip (property only) (readonly)
3291
+ * - `ariaDescriptionText`: undefined (property only) (readonly)
3292
+ *
3293
+ * ## Events
3294
+ *
3295
+ * Events that will be emitted by the component.
3296
+ *
3297
+ * - `slidervalidity`: undefined
3298
+ *
3299
+ * ## Methods
3300
+ *
3301
+ * Methods that can be called to access component functionality.
3302
+ *
3303
+ * - `resetFormControl() => void`: undefined
3304
+ * - `updateFieldAfterValidation() => void`: undefined
3305
+ */
3306
+ "w-slider-thumb": Partial<
3307
+ WarpSliderThumbProps &
3308
+ WarpSliderThumbSolidJsProps &
3309
+ BaseProps<WarpSliderThumb> &
3310
+ BaseEvents
3311
+ >;
3312
+
3313
+ /**
3314
+ * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
3315
+ *
3316
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
3317
+ *
3318
+ * ## Attributes & Properties
3319
+ *
3320
+ * Component attributes and properties that can be applied to the element or by using JavaScript.
3321
+ *
3322
+ * - `label`: The slider fieldset label. Required for proper accessibility.
3323
+ *
3324
+ * If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`)
3325
+ * - `disabled`: undefined
3326
+ * - `open-ended`/`openEnded`: Whether or not to allow values outside the range such as "Before 1950" and "2025+".
3327
+ * - `error`: undefined
3328
+ * - `help-text`/`helpText`: undefined
3329
+ * - `invalid`: undefined
3330
+ * - `required`: Ensures a child slider thumb has a value before allowing the containing form to submit.
3331
+ * - `min`: undefined
3332
+ * - `max`: undefined
3333
+ * - `markers`: Pass a value similar to step to create visual markers at that interval
3334
+ * - `step`: undefined
3335
+ * - `suffix`: Suffix used in text input fields and for the min and max values of the slider.
3336
+ * - `hidden-textfield`/`hiddenTextfield`: undefined
3337
+ * - `valueFormatter`: Formatter for the tooltip and input mask values. (property only)
3338
+ * - `labelFormatter`: Formatter for the min and max labels below the range. (property only)
3339
+ * - `_invalidMessage`: undefined (property only)
3340
+ * - `_hasInternalError`: undefined (property only)
3341
+ * - `_showError`: undefined (property only)
3342
+ * - `_tabbableElements`: undefined (property only)
3343
+ * - `edgeMin`: undefined (property only) (readonly)
3344
+ * - `edgeMax`: undefined (property only) (readonly)
3345
+ * - `componentHasError`: undefined (property only) (readonly)
3346
+ * - `errorText`: undefined (property only) (readonly)
3347
+ *
3348
+ * ## Slots
3349
+ *
3350
+ * Areas where markup can be added to the component.
3351
+ *
3352
+ * - `(default)`: For single sliders place a `<w-slider-thumb>` in the default slot.
3353
+ * - `label`: Label for the slider or range slider as a whole.
3354
+ * - `description`: Optional description between the label and slider.
3355
+ * - `from`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
3356
+ * - `to`: Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
3357
+ */
3358
+ "w-slider": Partial<
3359
+ WarpSliderProps &
3360
+ WarpSliderSolidJsProps &
3361
+ BaseProps<WarpSlider> &
3362
+ BaseEvents
3363
+ >;
3023
3364
  };
3024
3365
 
3025
3366
  export type CustomCssProperties = {};
@@ -0,0 +1,2 @@
1
+ import { WarpSlider } from './slider.js';
2
+ export declare const Slider: import("@lit/react").ReactWebComponent<WarpSlider, {}>;
@@ -0,0 +1,8 @@
1
+ import { createComponent } from '@lit/react';
2
+ import React from 'react';
3
+ import { WarpSlider } from './slider.js';
4
+ export const Slider = createComponent({
5
+ tagName: 'w-slider',
6
+ elementClass: WarpSlider,
7
+ react: React,
8
+ });
@@ -0,0 +1,2 @@
1
+ export * from '../slider-thumb/slider-thumb.js';
2
+ export * from './slider.js';
@@ -0,0 +1,2 @@
1
+ export * from '../slider-thumb/slider-thumb.js';
2
+ export * from './slider.js';
@@ -0,0 +1 @@
1
+ export const messages: any;
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"slider.label.from\":[\"From\"],\"slider.placeholder.to\":[\"Max\"],\"slider.placeholder.from\":[\"Min\"],\"slider.error.overlap\":[\"Maksimumværdien må ikke være mindre end minimumværdien\"],\"slider.error.required\":[\"Dette felt er påkrævet\"],\"slider.label.to\":[\"To\"],\"slider.error.out_of_bounds\":[\"Værdien skal være mellem \",[\"min\"],\" og \",[\"max\"]]}");
@@ -0,0 +1 @@
1
+ export const messages: any;
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"slider.label.from\":[\"From\"],\"slider.placeholder.to\":[\"Max\"],\"slider.placeholder.from\":[\"Min\"],\"slider.error.overlap\":[\"The maximum value cannot be less than the minimum\"],\"slider.error.required\":[\"This field is required\"],\"slider.label.to\":[\"To\"],\"slider.error.out_of_bounds\":[\"Value must be between \",[\"min\"],\" and \",[\"max\"]]}");
@@ -0,0 +1 @@
1
+ export const messages: any;
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"slider.label.from\":[\"From\"],\"slider.placeholder.to\":[\"Max\"],\"slider.placeholder.from\":[\"Min\"],\"slider.error.overlap\":[\"Maksimiarvo ei voi olla pienempi kuin minimiarvo\"],\"slider.error.required\":[\"Tämä kenttä on pakollinen\"],\"slider.label.to\":[\"To\"],\"slider.error.out_of_bounds\":[\"Arvon on oltava välillä \",[\"min\"],\" - \",[\"max\"]]}");
@@ -0,0 +1 @@
1
+ export const messages: any;
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"slider.label.from\":[\"From\"],\"slider.placeholder.to\":[\"Max\"],\"slider.placeholder.from\":[\"Min\"],\"slider.error.overlap\":[\"Maksimumsverdien kan ikke være mindre enn minimumsverdien\"],\"slider.error.required\":[\"Dette feltet er påkrevd\"],\"slider.label.to\":[\"To\"],\"slider.error.out_of_bounds\":[\"Verdien må være mellom \",[\"min\"],\" og \",[\"max\"]]}");
@@ -0,0 +1 @@
1
+ export const messages: any;
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"slider.label.from\":[\"From\"],\"slider.placeholder.to\":[\"Max\"],\"slider.placeholder.from\":[\"Min\"],\"slider.error.overlap\":[\"Maxvärdet kan inte vara mindre än minimivärdet\"],\"slider.error.required\":[\"Detta fält är obligatoriskt\"],\"slider.label.to\":[\"To\"],\"slider.error.out_of_bounds\":[\"Värdet måste vara mellan \",[\"min\"],\" och \",[\"max\"]]}");
@@ -0,0 +1,3 @@
1
+ import { WarpSlider } from './slider.js';
2
+ export { SliderThumb } from '../slider-thumb/react.js';
3
+ export declare const Slider: import("@lit/react").ReactWebComponent<WarpSlider, {}>;
@@ -0,0 +1,13 @@
1
+ import { createComponent } from '@lit/react';
2
+ import { LitElement } from 'lit';
3
+ import React from 'react';
4
+ // Re-export from split packages
5
+ export { SliderThumb } from '../slider-thumb/react.js';
6
+ // decouple from CDN by providing a dummy class
7
+ class Component extends LitElement {
8
+ }
9
+ export const Slider = createComponent({
10
+ tagName: 'w-slider',
11
+ elementClass: Component,
12
+ react: React,
13
+ });
@@ -0,0 +1,64 @@
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import type { SliderSlot } from '../slider-thumb/slider-thumb.js';
3
+ /**
4
+ * Parent component for sliders (both single and range sliders). Used in combination with a `<w-slider-thumb>`.
5
+ *
6
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-slider-and-range-slider--docs)
7
+ *
8
+ * @slot - For single sliders place a `<w-slider-thumb>` in the default slot.
9
+ * @slot label - Label for the slider or range slider as a whole.
10
+ * @slot description - Optional description between the label and slider.
11
+ * @slot from - Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
12
+ * @slot to - Range sliders need to place a `<w-slider-thumb>` in the from and to slots.
13
+ */
14
+ declare class WarpSlider extends LitElement {
15
+ #private;
16
+ static shadowRootOptions: {
17
+ delegatesFocus: boolean;
18
+ mode: ShadowRootMode;
19
+ serializable?: boolean;
20
+ slotAssignment?: SlotAssignmentMode;
21
+ };
22
+ static styles: import("lit").CSSResult[];
23
+ /**
24
+ * The slider fieldset label. Required for proper accessibility.
25
+ *
26
+ * If you need to display HTML, use the `label` slot instead (f. ex. `<legend class="sr-only" slot="label">Production year</legend>`)
27
+ */
28
+ label: string;
29
+ disabled: boolean;
30
+ /**
31
+ * Whether or not to allow values outside the range such as "Before 1950" and "2025+".
32
+ */
33
+ openEnded: boolean;
34
+ error: string;
35
+ helpText: string;
36
+ invalid: boolean;
37
+ /** Ensures a child slider thumb has a value before allowing the containing form to submit. */
38
+ required: boolean;
39
+ min: string;
40
+ max: string;
41
+ /** Pass a value similar to step to create visual markers at that interval */
42
+ markers: number;
43
+ step: number;
44
+ /** Suffix used in text input fields and for the min and max values of the slider. */
45
+ suffix: string;
46
+ hiddenTextfield: boolean;
47
+ /** Formatter for the tooltip and input mask values. */
48
+ valueFormatter: (value: string, slot: SliderSlot) => string;
49
+ /** Formatter for the min and max labels below the range. */
50
+ labelFormatter: (slot: SliderSlot) => string;
51
+ _invalidMessage: string;
52
+ _hasInternalError: boolean;
53
+ _showError: boolean;
54
+ _tabbableElements: Array<HTMLElement>;
55
+ constructor();
56
+ get edgeMin(): string;
57
+ get edgeMax(): string;
58
+ connectedCallback(): Promise<void>;
59
+ updated(changedProperties: PropertyValues<this>): void;
60
+ get componentHasError(): boolean;
61
+ get errorText(): string;
62
+ render(): import("lit").TemplateResult<1>;
63
+ }
64
+ export { WarpSlider };