zidan-select 2.3.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/plugin-core.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ZidanForm v2.3.0 — plugin-core.css
2
+ * ZidanForm v2.4.0 — plugin-core.css
3
3
  * Structure and mechanics only: layout, positioning, visibility, focus
4
4
  * plumbing and accessible native-input handling. No colours, borders colours,
5
5
  * shadows or decorative skin — load plugin-theme.css (or your own theme) for
@@ -536,6 +536,13 @@
536
536
  letter-spacing: 0.01em;
537
537
  }
538
538
 
539
+ /* The plugin renders its own label and hides the author's original one. Author
540
+ rules such as `.field-label { display:block }` would otherwise beat the
541
+ browser's [hidden] default and show both labels at once. */
542
+ [data-zs-hidden-label] {
543
+ display: none !important;
544
+ }
545
+
539
546
  .zs-field__hint {
540
547
  margin: 0;
541
548
  font-size: 0.75rem;
@@ -1552,6 +1559,26 @@ textarea.zs-input-native {
1552
1559
  font-variant-numeric: tabular-nums;
1553
1560
  }
1554
1561
 
1562
+ /* labeled endpoint ticks already show min and max: keep the row for layout,
1563
+ hide its text so the endpoints are printed once */
1564
+ .zs-range-scale--hidden {
1565
+ visibility: hidden;
1566
+ }
1567
+
1568
+ /* labeled ticks without a scale row need the label height reserved */
1569
+ .zs-range--labels-no-scale {
1570
+ padding-bottom: 18px;
1571
+ }
1572
+
1573
+ /* keep endpoint tick labels inside the track instead of half outside it */
1574
+ .zs-range-tick--labeled.zs-range-tick--start {
1575
+ transform: translateX(0);
1576
+ }
1577
+
1578
+ .zs-range-tick--labeled.zs-range-tick--end {
1579
+ transform: translateX(-100%);
1580
+ }
1581
+
1555
1582
  .zs-range-bubble {
1556
1583
  position: absolute;
1557
1584
  top: 0;
@@ -1568,6 +1595,46 @@ textarea.zs-input-native {
1568
1595
  pointer-events: none;
1569
1596
  }
1570
1597
 
1598
+ /* bubble and fill options */
1599
+ .zs-range--no-bubble {
1600
+ padding-top: 4px;
1601
+ }
1602
+
1603
+ .zs-range--bubble-active .zs-range-bubble {
1604
+ opacity: 0;
1605
+ visibility: hidden;
1606
+ transition: opacity 140ms ease;
1607
+ }
1608
+
1609
+ .zs-range--bubble-active:hover .zs-range-bubble,
1610
+ .zs-range--bubble-active:focus-within .zs-range-bubble,
1611
+ .zs-field--focused .zs-range--bubble-active .zs-range-bubble {
1612
+ opacity: 1;
1613
+ visibility: visible;
1614
+ }
1615
+
1616
+ .zs-range--bubble-bottom {
1617
+ padding-bottom: 30px;
1618
+ }
1619
+
1620
+ /* labels sit above the bubble, so both need room */
1621
+ .zs-range--bubble-bottom.zs-range--labels-no-scale {
1622
+ padding-bottom: 38px;
1623
+ }
1624
+
1625
+ .zs-range--bubble-bottom .zs-range-bubble {
1626
+ top: auto;
1627
+ bottom: 0;
1628
+ }
1629
+
1630
+ .zs-range--fill-off .zs-input-native::-webkit-slider-runnable-track {
1631
+ background: var(--zs-range-track);
1632
+ }
1633
+
1634
+ .zs-range--fill-off .zs-input-native::-moz-range-progress {
1635
+ background: var(--zs-range-track);
1636
+ }
1637
+
1571
1638
  [dir="rtl"] .zs-range-tick,
1572
1639
  [dir="rtl"] .zs-range-tick--labeled {
1573
1640
  transform: translateX(50%);
@@ -1586,6 +1653,47 @@ textarea.zs-input-native {
1586
1653
  transform: translateX(50%);
1587
1654
  }
1588
1655
 
1656
+ [dir="rtl"] .zs-range-tick--labeled.zs-range-tick--start {
1657
+ transform: translateX(-100%);
1658
+ }
1659
+
1660
+ [dir="rtl"] .zs-range-tick--labeled.zs-range-tick--end {
1661
+ transform: translateX(0);
1662
+ }
1663
+
1664
+ .zs-field[dir="rtl"] .zs-range-tick--labeled.zs-range-tick--start {
1665
+ transform: translateX(-100%);
1666
+ }
1667
+
1668
+ .zs-field[dir="rtl"] .zs-range-tick--labeled.zs-range-tick--end {
1669
+ transform: translateX(0);
1670
+ }
1671
+
1672
+ /* keep the value bubble inside the track at both ends */
1673
+ .zs-range-bubble--start {
1674
+ transform: translateX(0);
1675
+ }
1676
+
1677
+ .zs-range-bubble--end {
1678
+ transform: translateX(-100%);
1679
+ }
1680
+
1681
+ [dir="rtl"] .zs-range-bubble--start {
1682
+ transform: translateX(-100%);
1683
+ }
1684
+
1685
+ [dir="rtl"] .zs-range-bubble--end {
1686
+ transform: translateX(0);
1687
+ }
1688
+
1689
+ .zs-field[dir="rtl"] .zs-range-bubble--start {
1690
+ transform: translateX(-100%);
1691
+ }
1692
+
1693
+ .zs-field[dir="rtl"] .zs-range-bubble--end {
1694
+ transform: translateX(0);
1695
+ }
1696
+
1589
1697
  /* validation state icons */
1590
1698
  .zs-input-validation {
1591
1699
  display: none;
package/plugin-theme.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ZidanForm v2.3.0 — plugin-theme.css
2
+ * ZidanForm v2.4.0 — plugin-theme.css
3
3
  * Design tokens, paint, state colours, preset themes (default, modern,
4
4
  * minimal, dark, glass), the five select layouts and framework adapters
5
5
  * (bootstrap, tailwind, bulma, foundation).
package/zidan-form.d.ts CHANGED
@@ -106,6 +106,24 @@ export interface SelectOptions extends SelectCallbacks {
106
106
  autoLoadMore?: boolean;
107
107
  cacheResults?: boolean;
108
108
  loadMoreText?: string;
109
+ /** AJAX without JS: GET this URL and the select builds its own fetchOptions */
110
+ fetchUrl?: string | null;
111
+ fetchMethod?: string;
112
+ /** Query-string parameter for the search term (set to '' to omit it) */
113
+ fetchQueryParam?: string;
114
+ /** 1-based page parameter (set to '' to omit it) */
115
+ fetchPageParam?: string;
116
+ /** When set, send skip = page * pageSize instead of fetchPageParam */
117
+ fetchSkipParam?: string | null;
118
+ fetchPageSizeParam?: string;
119
+ /** Dot path to the array of rows in the JSON body, e.g. 'data.items' */
120
+ fetchItemsPath?: string | null;
121
+ /** Dot path to the total row count, used to decide hasMore */
122
+ fetchTotalPath?: string | null;
123
+ /** Dot path to a boolean hasMore flag */
124
+ fetchHasMorePath?: string | null;
125
+ fetchHeaders?: Record<string, string> | null;
126
+ fetchCredentials?: RequestCredentials;
109
127
  maxTags?: number;
110
128
  minTagLength?: number;
111
129
  maxTagLength?: number;
@@ -220,8 +238,17 @@ export interface TextFieldOptions extends FieldOptions {
220
238
  phone?: boolean;
221
239
  phoneCountry?: string;
222
240
  phoneFormat?: PhoneFormat;
241
+ rangeVariant?: 'default' | 'gradient' | 'stepped' | 'minimal';
242
+ rangeBubble?: boolean;
243
+ rangeBubbleMode?: 'always' | 'active' | 'never';
244
+ rangeBubblePosition?: 'top' | 'bottom';
245
+ rangeFill?: boolean;
246
+ rangeMinMax?: boolean;
247
+ rangeTicks?: number[] | number | string;
248
+ rangeTickLabels?: boolean;
249
+ rangeMinLabel?: string;
250
+ rangeMaxLabel?: string;
223
251
  rangeFormat?: string | ((value: number, field: ZidanTextField) => string);
224
- rangeTicks?: number[];
225
252
  rangeLabels?: Record<string, string>;
226
253
  disableWeekends?: boolean;
227
254
  disabledDates?: string[] | string | ((value: string, date: Date) => boolean);