@planningcenter/tapestry 4.2.0-rc.8 → 4.2.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.
Files changed (36) hide show
  1. package/dist/components/button/ToggleButton.d.ts +52 -0
  2. package/dist/components/button/ToggleButton.d.ts.map +1 -0
  3. package/dist/components/button/ToggleButton.js +56 -0
  4. package/dist/components/button/ToggleButton.js.map +1 -0
  5. package/dist/components/button/ToggleIconButton.d.ts +17 -0
  6. package/dist/components/button/ToggleIconButton.d.ts.map +1 -0
  7. package/dist/components/button/ToggleIconButton.js +32 -0
  8. package/dist/components/button/ToggleIconButton.js.map +1 -0
  9. package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
  10. package/dist/components/combo-box/ComboBox.js +2 -2
  11. package/dist/components/combo-box/ComboBox.js.map +1 -1
  12. package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
  13. package/dist/components/date-picker/DatePicker.js +3 -3
  14. package/dist/components/date-picker/DatePicker.js.map +1 -1
  15. package/dist/components/internal/tooltip/Tooltip.d.ts.map +1 -1
  16. package/dist/components/internal/tooltip/Tooltip.js +1 -1
  17. package/dist/components/internal/tooltip/Tooltip.js.map +1 -1
  18. package/dist/components/number-stepper/NumberStepper.d.ts.map +1 -1
  19. package/dist/components/number-stepper/NumberStepper.js +2 -2
  20. package/dist/components/number-stepper/NumberStepper.js.map +1 -1
  21. package/dist/components/time-field/TimeField.d.ts.map +1 -1
  22. package/dist/components/time-field/TimeField.js +2 -2
  23. package/dist/components/time-field/TimeField.js.map +1 -1
  24. package/dist/index.css +13 -2
  25. package/dist/index.css.map +1 -1
  26. package/dist/reactRender.css +1016 -1005
  27. package/dist/reactRender.css.map +1 -1
  28. package/dist/reactRenderLegacy.css +1016 -1005
  29. package/dist/reactRenderLegacy.css.map +1 -1
  30. package/dist/unstable.css +848 -837
  31. package/dist/unstable.css.map +1 -1
  32. package/dist/unstable.d.ts +3 -0
  33. package/dist/unstable.d.ts.map +1 -1
  34. package/dist/unstable.js +2 -0
  35. package/dist/unstable.js.map +1 -1
  36. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"TimeField.js","sources":["../../../src/components/time-field/TimeField.tsx"],"sourcesContent":["import \"../field/index.css\"\nimport \"./index.css\"\n\nimport {\n type CalendarDateTime,\n parseTime,\n type Time,\n type ZonedDateTime,\n} from \"@internationalized/date\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport classNames from \"classnames\"\nimport React from \"react\"\nimport {\n DateInput,\n DateSegment,\n Label,\n Text,\n TimeField as AriaTimeField,\n type TimeFieldProps as AriaTimeFieldProps,\n} from \"react-aria-components/TimeField\"\n\nexport type TimeFieldSize = \"md\" | \"lg\"\n\nexport type TimeFieldValue = CalendarDateTime | Time | ZonedDateTime\n\nexport interface TimeFieldProps {\n /** The default value for the field, as a `TimeFieldValue` or an ISO 8601 time string (e.g. `\"12:00\"`). */\n defaultValue?: TimeFieldValue | string\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: React.ReactNode\n /** Disables the field. */\n disabled?: boolean\n /** If `true`, always shows leading zeros in the hour field. */\n forceLeadingZeros?: boolean\n /** If `true`, renders the label visually hidden. */\n hideLabel?: boolean\n /** If `true`, applies error styling to the field and description. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /** The maximum allowed time (e.g. `new Time(17, 0)`). */\n max?: TimeFieldValue\n /** The minimum allowed time (e.g. `new Time(9, 0)`). */\n min?: TimeFieldValue\n /** Allows the value to be read but not changed. */\n readOnly?: boolean\n /** If `true`, appends an asterisk after the label text. */\n required?: boolean\n /** The size of the time field. */\n size?: TimeFieldSize\n}\n\ntype AriaTimeFieldPropsToOmit =\n | \"children\"\n | \"granularity\"\n | \"placeholderValue\"\n | \"shouldForceLeadingZeros\"\n | \"slot\"\n\ntype AriaTimeFieldPropsToInclude =\n | \"hideTimeZone\"\n | \"hourCycle\"\n | \"name\"\n | \"onChange\"\n | \"value\"\n\nexport type TimeFieldElementProps = CombineAriaPropsWithCustomProps<\n AriaTimeFieldProps<TimeFieldValue>,\n TimeFieldProps,\n AriaTimeFieldPropsToOmit,\n AriaTimeFieldPropsToInclude\n>\n\n/**\n * A time field component allows users to enter and edit time values as individual\n * segments. Each segment supports keyboard entry, increment/decrement\n * with arrow keys, and respects the user's locale (12- vs 24-hour clock),\n * which can be overridden with `hourCycle`.\n *\n * Values are `Time`, `CalendarDateTime`, or `ZonedDateTime` from\n * `@internationalized/date`. Restrict the allowed range with `min`/`max`.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-timefield--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport function TimeField({\n className,\n defaultValue,\n description,\n disabled,\n forceLeadingZeros,\n hideLabel,\n invalid,\n label,\n max,\n min,\n readOnly,\n required,\n size = \"md\",\n ...restProps\n}: TimeFieldElementProps) {\n const resolvedDefaultValue =\n typeof defaultValue === \"string\" ? parseTime(defaultValue) : defaultValue\n const combinedClassName = classNames(\n \"tds-field tds-time-field\",\n {\n \"tds-field--lg\": size === \"lg\",\n \"tds-time-field--lg\": size === \"lg\",\n },\n className\n )\n\n return (\n <AriaTimeField\n {...restProps}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultValue={resolvedDefaultValue}\n granularity=\"minute\"\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n maxValue={max ?? undefined}\n minValue={min ?? undefined}\n shouldForceLeadingZeros={forceLeadingZeros}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <DateInput className=\"tds-field-control tds-time-field-input\">\n {(segment) => (\n <DateSegment\n className={\n segment.type === \"literal\"\n ? \"tds-field-date-segment-separator\"\n : \"tds-field-date-segment\"\n }\n segment={segment}\n />\n )}\n </DateInput>\n {description && (\n <Text\n elementType=\"p\"\n className=\"tds-field-description\"\n slot=\"description\"\n >\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaTimeField>\n )\n}\n"],"names":["parseTime","AriaTimeField"],"mappings":";;;;;;AA0EA;;;;;;;;;;;;AAYG;AACG,SAAU,SAAS,CAAC,EACxB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACU,EAAA;AACtB,IAAA,MAAM,oBAAoB,GACxB,OAAO,YAAY,KAAK,QAAQ,GAAGA,yCAAS,CAAC,YAAY,CAAC,GAAG,YAAY;AAC3E,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,0BAA0B,EAC1B;QACE,eAAe,EAAE,IAAI,KAAK,IAAI;QAC9B,oBAAoB,EAAE,IAAI,KAAK,IAAI;KACpC,EACD,SAAS,CACV;IAED,QACE,KAAA,CAAA,aAAA,CAACC,WAAa,EAAA,EAAA,GACR,SAAS,EAAA,YAAA,EACD,SAAS,GAAG,KAAK,GAAG,SAAS,EACzC,SAAS,EAAE,iBAAiB,EAC5B,YAAY,EAAE,oBAAoB,EAClC,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,uBAAuB,EAAE,iBAAiB,EAAA;QAEzC,CAAC,SAAS,IAAI,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,SAAS,EAAC,iBAAiB,EAAA,EAAE,KAAK,CAAS;QACjE,KAAA,CAAA,aAAA,CAAC,SAAS,IAAC,SAAS,EAAC,wCAAwC,EAAA,EAC1D,CAAC,OAAO,MACP,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EACV,SAAS,EACP,OAAO,CAAC,IAAI,KAAK;AACf,kBAAE;kBACA,wBAAwB,EAE9B,OAAO,EAAE,OAAO,EAAA,CAChB,CACH,CACS;AACX,QAAA,WAAW,KACV,KAAA,CAAA,aAAA,CAAC,IAAI,IACH,WAAW,EAAC,GAAG,EACf,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAC,aAAa,EAAA;YAElB,KAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,oCAAoC,EAC9C,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,WAAW,CACP,CACR,CACa;AAEpB;;;;"}
1
+ {"version":3,"file":"TimeField.js","sources":["../../../src/components/time-field/TimeField.tsx"],"sourcesContent":["import \"../field/index.css\"\nimport \"./index.css\"\n\nimport {\n type CalendarDateTime,\n parseTime,\n type Time,\n type ZonedDateTime,\n} from \"@internationalized/date\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport classNames from \"classnames\"\nimport React from \"react\"\nimport {\n DateInput,\n DateSegment,\n Label,\n Text,\n TimeField as AriaTimeField,\n type TimeFieldProps as AriaTimeFieldProps,\n} from \"react-aria-components/TimeField\"\n\nexport type TimeFieldSize = \"md\" | \"lg\"\n\nexport type TimeFieldValue = CalendarDateTime | Time | ZonedDateTime\n\nexport interface TimeFieldProps {\n /** The default value for the field, as a `TimeFieldValue` or an ISO 8601 time string (e.g. `\"12:00\"`). */\n defaultValue?: TimeFieldValue | string\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: React.ReactNode\n /** Disables the field. */\n disabled?: boolean\n /** If `true`, always shows leading zeros in the hour field. */\n forceLeadingZeros?: boolean\n /** If `true`, renders the label visually hidden. */\n hideLabel?: boolean\n /** If `true`, applies error styling to the field and description. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /** The maximum allowed time (e.g. `new Time(17, 0)`). */\n max?: TimeFieldValue\n /** The minimum allowed time (e.g. `new Time(9, 0)`). */\n min?: TimeFieldValue\n /** Allows the value to be read but not changed. */\n readOnly?: boolean\n /** If `true`, appends an asterisk after the label text. */\n required?: boolean\n /** The size of the time field. */\n size?: TimeFieldSize\n}\n\ntype AriaTimeFieldPropsToOmit =\n | \"children\"\n | \"granularity\"\n | \"placeholderValue\"\n | \"shouldForceLeadingZeros\"\n | \"slot\"\n\ntype AriaTimeFieldPropsToInclude =\n | \"hideTimeZone\"\n | \"hourCycle\"\n | \"name\"\n | \"onChange\"\n | \"value\"\n\nexport type TimeFieldElementProps = CombineAriaPropsWithCustomProps<\n AriaTimeFieldProps<TimeFieldValue>,\n TimeFieldProps,\n AriaTimeFieldPropsToOmit,\n AriaTimeFieldPropsToInclude\n>\n\n/**\n * A time field component allows users to enter and edit time values as individual\n * segments. Each segment supports keyboard entry, increment/decrement\n * with arrow keys, and respects the user's locale (12- vs 24-hour clock),\n * which can be overridden with `hourCycle`.\n *\n * Values are `Time`, `CalendarDateTime`, or `ZonedDateTime` from\n * `@internationalized/date`. Restrict the allowed range with `min`/`max`.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-timefield--docs | Storybook Documentation}\n * @see {@link https://github.com/planningcenter/tapestry/tree/main/packages/tapestry-migration-cli | Migration CLI: Available}\n */\nexport function TimeField({\n className,\n defaultValue,\n description,\n disabled,\n forceLeadingZeros,\n hideLabel,\n invalid,\n label,\n max,\n min,\n readOnly,\n required,\n size = \"md\",\n ...restProps\n}: TimeFieldElementProps) {\n const resolvedDefaultValue =\n typeof defaultValue === \"string\" ? parseTime(defaultValue) : defaultValue\n const combinedClassName = classNames(\n \"tds-field tds-time-field\",\n {\n \"tds-field--lg\": size === \"lg\",\n \"tds-time-field--lg\": size === \"lg\",\n },\n className\n )\n\n return (\n <AriaTimeField\n {...restProps}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n defaultValue={resolvedDefaultValue}\n granularity=\"minute\"\n isDisabled={disabled}\n isReadOnly={readOnly}\n isRequired={required}\n maxValue={max ?? undefined}\n minValue={min ?? undefined}\n shouldForceLeadingZeros={forceLeadingZeros}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <DateInput\n aria-invalid={invalid || undefined}\n className=\"tds-field-control tds-time-field-input\"\n >\n {(segment) => (\n <DateSegment\n aria-invalid={invalid || undefined}\n className={\n segment.type === \"literal\"\n ? \"tds-field-date-segment-separator\"\n : \"tds-field-date-segment\"\n }\n segment={segment}\n />\n )}\n </DateInput>\n {description && (\n <Text\n elementType=\"p\"\n className=\"tds-field-description\"\n slot=\"description\"\n >\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaTimeField>\n )\n}\n"],"names":["parseTime","AriaTimeField"],"mappings":";;;;;;AA0EA;;;;;;;;;;;;AAYG;AACG,SAAU,SAAS,CAAC,EACxB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACU,EAAA;AACtB,IAAA,MAAM,oBAAoB,GACxB,OAAO,YAAY,KAAK,QAAQ,GAAGA,yCAAS,CAAC,YAAY,CAAC,GAAG,YAAY;AAC3E,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,0BAA0B,EAC1B;QACE,eAAe,EAAE,IAAI,KAAK,IAAI;QAC9B,oBAAoB,EAAE,IAAI,KAAK,IAAI;KACpC,EACD,SAAS,CACV;IAED,QACE,KAAA,CAAA,aAAA,CAACC,WAAa,EAAA,EAAA,GACR,SAAS,gBACD,SAAS,GAAG,KAAK,GAAG,SAAS,EACzC,SAAS,EAAE,iBAAiB,EAC5B,YAAY,EAAE,oBAAoB,EAClC,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,uBAAuB,EAAE,iBAAiB,EAAA;QAEzC,CAAC,SAAS,IAAI,KAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,SAAS,EAAC,iBAAiB,EAAA,EAAE,KAAK,CAAS;AACjE,QAAA,KAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,cAAA,EACM,OAAO,IAAI,SAAS,EAClC,SAAS,EAAC,wCAAwC,EAAA,EAEjD,CAAC,OAAO,MACP,KAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EAAA,cAAA,EACI,OAAO,IAAI,SAAS,EAClC,SAAS,EACP,OAAO,CAAC,IAAI,KAAK;AACf,kBAAE;kBACA,wBAAwB,EAE9B,OAAO,EAAE,OAAO,EAAA,CAChB,CACH,CACS;AACX,QAAA,WAAW,KACV,KAAA,CAAA,aAAA,CAAC,IAAI,IACH,WAAW,EAAC,GAAG,EACf,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAC,aAAa,EAAA;YAElB,KAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,oCAAoC,EAC9C,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,WAAW,CACP,CACR,CACa;AAEpB;;;;"}
package/dist/index.css CHANGED
@@ -2303,12 +2303,23 @@ tds-sidenav-section:not(.hydrated) > [slot="ssr"]{
2303
2303
  border-color:var(--tds-btn-border-color-hover);
2304
2304
  }
2305
2305
 
2306
- .tds-btn:active,.tds-btn.active,.tds-btn[aria-pressed="true"]{
2306
+ .tds-btn:active,.tds-btn.active{
2307
2307
  color:var(--tds-btn-color-active);
2308
2308
  background-color:var(--tds-btn-bg-active);
2309
2309
  border-color:var(--tds-btn-border-color-active);
2310
2310
  }
2311
2311
 
2312
+ .tds-btn[aria-pressed="true"]{
2313
+ color:var(--tds-btn-color-active);
2314
+ background-color:var(--tds-btn-bg-active);
2315
+ border-color:var(--tds-btn-border-color-active);
2316
+ }
2317
+
2318
+ .tds-btn[aria-pressed="true"]:hover,.tds-btn[aria-pressed="true"]:focus-visible{
2319
+ background-color:hsl(from var(--tds-btn-bg-active) h s calc(l - 5));
2320
+ border-color:hsl(from var(--tds-btn-border-color-active) h s calc(l - 5));
2321
+ }
2322
+
2312
2323
  .tds-btn:disabled,.tds-btn.disabled{
2313
2324
  --tds-btn-loading-spinner-track-color:var(--t-fill-color-transparency-dark-020);
2314
2325
  --tds-btn-loading-spinner-color:var(--t-text-color-status-neutral);
@@ -3405,7 +3416,7 @@ tds-sidenav-section:not(.hydrated) > [slot="ssr"]{
3405
3416
  content:"*" / "";
3406
3417
  }
3407
3418
 
3408
- .tds-field[data-invalid]{
3419
+ .tds-field:has([aria-invalid="true"]),.tds-field[data-invalid]{
3409
3420
  --tds-field-border-color:var(--t-form-border-color-error);
3410
3421
  --tds-field-border-color-hover:var(--t-form-border-color-error-hover);
3411
3422
  --tds-field-border-color-active:var(--t-form-border-color-error-hover);