@raystack/apsara 0.31.1 → 0.32.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/dist/command/command.cjs +3 -0
- package/dist/command/command.cjs.map +1 -1
- package/dist/command/command.d.ts.map +1 -1
- package/dist/command/command.js +3 -0
- package/dist/command/command.js.map +1 -1
- package/dist/dialog/dialog.cjs +12 -0
- package/dist/dialog/dialog.cjs.map +1 -1
- package/dist/dialog/dialog.d.ts.map +1 -1
- package/dist/dialog/dialog.js +12 -0
- package/dist/dialog/dialog.js.map +1 -1
- package/dist/select/select.cjs +3 -0
- package/dist/select/select.cjs.map +1 -1
- package/dist/select/select.d.ts.map +1 -1
- package/dist/select/select.js +3 -0
- package/dist/select/select.js.map +1 -1
- package/dist/sheet/sheet.cjs +9 -0
- package/dist/sheet/sheet.cjs.map +1 -1
- package/dist/sheet/sheet.d.ts +12 -0
- package/dist/sheet/sheet.d.ts.map +1 -1
- package/dist/sheet/sheet.js +9 -0
- package/dist/sheet/sheet.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/table/table.cjs +24 -0
- package/dist/table/table.cjs.map +1 -1
- package/dist/table/table.d.ts.map +1 -1
- package/dist/table/table.js +24 -0
- package/dist/table/table.js.map +1 -1
- package/dist/toggle-group/togglegroup.cjs +9 -0
- package/dist/toggle-group/togglegroup.cjs.map +1 -1
- package/dist/toggle-group/togglegroup.d.ts.map +1 -1
- package/dist/toggle-group/togglegroup.js +9 -0
- package/dist/toggle-group/togglegroup.js.map +1 -1
- package/dist/v1/components/calendar/range-picker.cjs +2 -2
- package/dist/v1/components/calendar/range-picker.cjs.map +1 -1
- package/dist/v1/components/calendar/range-picker.d.ts +5 -1
- package/dist/v1/components/calendar/range-picker.d.ts.map +1 -1
- package/dist/v1/components/calendar/range-picker.js +2 -2
- package/dist/v1/components/calendar/range-picker.js.map +1 -1
- package/dist/v1/components/chip/chip.cjs +6 -6
- package/dist/v1/components/chip/chip.cjs.map +1 -1
- package/dist/v1/components/chip/chip.d.ts +3 -3
- package/dist/v1/components/chip/chip.d.ts.map +1 -1
- package/dist/v1/components/chip/chip.js +6 -6
- package/dist/v1/components/chip/chip.js.map +1 -1
- package/dist/v1/components/chip/chip.module.css.cjs +1 -1
- package/dist/v1/components/chip/chip.module.css.js +1 -1
- package/dist/v1/components/command/command.cjs +52 -0
- package/dist/v1/components/command/command.cjs.map +1 -0
- package/dist/v1/components/command/command.d.ts +2 -0
- package/dist/v1/components/command/command.d.ts.map +1 -0
- package/dist/v1/components/command/command.js +50 -0
- package/dist/v1/components/command/command.js.map +1 -0
- package/dist/v1/components/command/command.module.css.cjs +8 -0
- package/dist/v1/components/command/command.module.css.cjs.map +1 -0
- package/dist/v1/components/command/command.module.css.js +4 -0
- package/dist/v1/components/command/command.module.css.js.map +1 -0
- package/dist/v1/components/command/index.d.ts +2 -0
- package/dist/v1/components/command/index.d.ts.map +1 -0
- package/dist/v1/components/dialog/dialog.cjs +32 -0
- package/dist/v1/components/dialog/dialog.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.d.ts +26 -0
- package/dist/v1/components/dialog/dialog.d.ts.map +1 -0
- package/dist/v1/components/dialog/dialog.js +29 -0
- package/dist/v1/components/dialog/dialog.js.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs +8 -0
- package/dist/v1/components/dialog/dialog.module.css.cjs.map +1 -0
- package/dist/v1/components/dialog/dialog.module.css.js +4 -0
- package/dist/v1/components/dialog/dialog.module.css.js.map +1 -0
- package/dist/v1/components/dialog/index.d.ts +2 -0
- package/dist/v1/components/dialog/index.d.ts.map +1 -0
- package/dist/v1/components/flex/flex.cjs +9 -0
- package/dist/v1/components/flex/flex.cjs.map +1 -1
- package/dist/v1/components/flex/flex.d.ts +1 -1
- package/dist/v1/components/flex/flex.d.ts.map +1 -1
- package/dist/v1/components/flex/flex.js +9 -0
- package/dist/v1/components/flex/flex.js.map +1 -1
- package/dist/v1/components/flex/flex.module.css.cjs +1 -1
- package/dist/v1/components/flex/flex.module.css.js +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs +1 -1
- package/dist/v1/components/icon-button/icon-button.cjs.map +1 -1
- package/dist/v1/components/icon-button/icon-button.d.ts +1 -2
- package/dist/v1/components/icon-button/icon-button.d.ts.map +1 -1
- package/dist/v1/components/icon-button/icon-button.js +1 -1
- package/dist/v1/components/icon-button/icon-button.js.map +1 -1
- package/dist/v1/components/input-field/input-field.module.css.cjs +1 -1
- package/dist/v1/components/input-field/input-field.module.css.js +1 -1
- package/dist/v1/components/select/select.cjs +5 -5
- package/dist/v1/components/select/select.cjs.map +1 -1
- package/dist/v1/components/select/select.d.ts +12 -1
- package/dist/v1/components/select/select.d.ts.map +1 -1
- package/dist/v1/components/select/select.js +5 -5
- package/dist/v1/components/select/select.js.map +1 -1
- package/dist/v1/components/select/select.module.css.cjs +1 -1
- package/dist/v1/components/select/select.module.css.js +1 -1
- package/dist/v1/components/sheet/index.d.ts +2 -0
- package/dist/v1/components/sheet/index.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.cjs +48 -0
- package/dist/v1/components/sheet/sheet.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.d.ts +35 -0
- package/dist/v1/components/sheet/sheet.d.ts.map +1 -0
- package/dist/v1/components/sheet/sheet.js +43 -0
- package/dist/v1/components/sheet/sheet.js.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs +8 -0
- package/dist/v1/components/sheet/sheet.module.css.cjs.map +1 -0
- package/dist/v1/components/sheet/sheet.module.css.js +4 -0
- package/dist/v1/components/sheet/sheet.module.css.js.map +1 -0
- package/dist/v1/components/table/index.d.ts +2 -0
- package/dist/v1/components/table/index.d.ts.map +1 -0
- package/dist/v1/components/table/table.cjs +44 -0
- package/dist/v1/components/table/table.cjs.map +1 -0
- package/dist/v1/components/table/table.d.ts +30 -0
- package/dist/v1/components/table/table.d.ts.map +1 -0
- package/dist/v1/components/table/table.js +42 -0
- package/dist/v1/components/table/table.js.map +1 -0
- package/dist/v1/components/table/table.module.css.cjs +8 -0
- package/dist/v1/components/table/table.module.css.cjs.map +1 -0
- package/dist/v1/components/table/table.module.css.js +4 -0
- package/dist/v1/components/table/table.module.css.js.map +1 -0
- package/dist/v1/components/tooltip/tooltip.cjs +3 -2
- package/dist/v1/components/tooltip/tooltip.cjs.map +1 -1
- package/dist/v1/components/tooltip/tooltip.d.ts +8 -2
- package/dist/v1/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/v1/components/tooltip/tooltip.js +3 -2
- package/dist/v1/components/tooltip/tooltip.js.map +1 -1
- package/dist/v1/index.cjs +10 -0
- package/dist/v1/index.cjs.map +1 -1
- package/dist/v1/index.d.ts +5 -0
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +5 -0
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs +11 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js +9 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_primitive@1.0.0/node_modules/@radix-ui/primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js +27 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-compose-refs@1.0.0_react@18.2.0/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs +103 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js +101 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-context@1.0.0_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs +224 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js +214 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs +298 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js +280 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dialog@1.0.4_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dialog/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs +235 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js +233 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs +32 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js +30 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-guards@1.0.0_react@18.2.0/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs +254 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js +252 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-focus-scope@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-focus-scope/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs +40 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-id@1.0.0_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-menu@2.0.5_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-menu/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js +2 -2
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-popover@1.0.6_@types_react-dom@18.0.11_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-popover/dist/index.js.map +1 -1
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs +17 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js +15 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-portal@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-portal/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs +133 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js +131 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-presence@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs +88 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js +85 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-primitive@1.0.0_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs +82 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js +79 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-slot@1.0.0_react@18.2.0/node_modules/@radix-ui/react-slot/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js +19 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-callback-ref@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs +50 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js +48 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-controllable-state@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs +23 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js +21 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-escape-keydown@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs +14 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js +12 -0
- package/dist/v1/node_modules/.pnpm/@radix-ui_react-use-layout-effect@1.0.0_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs +39 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js +8 -0
- package/dist/v1/node_modules/.pnpm/cmdk@0.2.0_@types_react@18.2.12_react-dom@18.3.1_react@18.2.0__react@18.2.0/node_modules/cmdk/dist/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs +146 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js +142 -0
- package/dist/v1/node_modules/.pnpm/command-score@0.1.2/node_modules/command-score/index.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +34 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +11 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +169 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs +60 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +24 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +100 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +97 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +12 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.4_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -2
- package/dist/v1/node_modules/.pnpm/react-remove-scroll@2.5.5_@types_react@18.2.12_react@18.2.0/node_modules/react-remove-scroll/dist/es2015/Combination.js +2 -2
- package/dist/v1/style.css +1 -1
- package/package.json +1 -1
package/dist/table/table.cjs
CHANGED
|
@@ -25,27 +25,51 @@ function _interopNamespaceDefault(e) {
|
|
|
25
25
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
26
26
|
|
|
27
27
|
const table = index.cva(table_module.default.table);
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
30
|
+
*/
|
|
28
31
|
const TableRoot = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("div", { style: { width: "100%", overflow: "auto" }, children: jsxRuntime.jsxRuntimeExports.jsx("table", { ref: ref, className: table({ className }), ...props }) })));
|
|
29
32
|
TableRoot.displayName = "Table";
|
|
30
33
|
const header = index.cva(table_module.default.header);
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
36
|
+
*/
|
|
31
37
|
const TableHeader = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("thead", { ref: ref, className: header({ className }), ...props })));
|
|
32
38
|
TableHeader.displayName = "TableHeader";
|
|
33
39
|
const body = index.cva(table_module.default.body);
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
42
|
+
*/
|
|
34
43
|
const TableBody = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("tbody", { ref: ref, className: body({ className }), ...props })));
|
|
35
44
|
TableBody.displayName = "TableBody";
|
|
36
45
|
const footer = index.cva(table_module.default.footer);
|
|
46
|
+
/**
|
|
47
|
+
* @deprecated TableFooter is removed and no longer supported in `@raystack/apsara/v1`
|
|
48
|
+
*/
|
|
37
49
|
const TableFooter = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("tfoot", { ref: ref, className: footer({ className }), ...props })));
|
|
38
50
|
TableFooter.displayName = "TableFooter";
|
|
39
51
|
const row = index.cva(table_module.default.row);
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
54
|
+
*/
|
|
40
55
|
const TableRow = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("tr", { ref: ref, className: row({ className }), ...props })));
|
|
41
56
|
TableRow.displayName = "TableRow";
|
|
42
57
|
const head = index.cva(table_module.default.head);
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
60
|
+
*/
|
|
43
61
|
const TableHead = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("th", { ref: ref, className: head({ className }), ...props })));
|
|
44
62
|
TableHead.displayName = "TableHead";
|
|
45
63
|
const cell = index.cva(table_module.default.cell);
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
66
|
+
*/
|
|
46
67
|
const TableCell = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("td", { ref: ref, className: cell({ className }), ...props })));
|
|
47
68
|
TableCell.displayName = "TableCell";
|
|
48
69
|
const caption = index.cva(table_module.default.caption);
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated TableCaption is removed and no longer supported in `@raystack/apsara/v1`
|
|
72
|
+
*/
|
|
49
73
|
const TableCaption = React__namespace.forwardRef(({ className, ...props }, ref) => (jsxRuntime.jsxRuntimeExports.jsx("caption", { ref: ref, className: caption({ className }), ...props })));
|
|
50
74
|
TableCaption.displayName = "TableCaption";
|
|
51
75
|
const Table = Object.assign(TableRoot, {
|
package/dist/table/table.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.cjs","sources":["../../table/table.tsx"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport styles from \"./table.module.css\";\n\nconst table = cva(styles.table);\nconst TableRoot = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> &\n React.PropsWithChildren<VariantProps<typeof table>>\n>(({ className, ...props }, ref) => (\n <div style={{ width: \"100%\", overflow: \"auto\" }}>\n <table ref={ref} className={table({ className })} {...props} />\n </div>\n));\nTableRoot.displayName = \"Table\";\n\nconst header = cva(styles.header);\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof header>>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={header({ className })} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst body = cva(styles.body);\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof body>>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={body({ className })} {...props} />\n));\nTableBody.displayName = \"TableBody\";\n\nconst footer = cva(styles.footer);\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof footer>>\n>(({ className, ...props }, ref) => (\n <tfoot ref={ref} className={footer({ className })} {...props} />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst row = cva(styles.row);\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement> &\n React.PropsWithChildren<VariantProps<typeof row>>\n>(({ className, ...props }, ref) => (\n <tr ref={ref} className={row({ className })} {...props} />\n));\nTableRow.displayName = \"TableRow\";\n\nconst head = cva(styles.head);\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <th ref={ref} className={head({ className })} {...props} />\n));\nTableHead.displayName = \"TableHead\";\n\nconst cell = cva(styles.cell);\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <td ref={ref} className={cell({ className })} {...props} />\n));\nTableCell.displayName = \"TableCell\";\n\nconst caption = cva(styles.caption);\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={caption({ className })} {...props} />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport const Table = Object.assign(TableRoot, {\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Head: TableHead,\n Row: TableRow,\n Cell: TableCell,\n Caption: TableCaption,\n});\n"],"names":["cva","styles","React","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,MAAM,KAAK,GAAGA,SAAG,CAACC,oBAAM,CAAC,KAAK,CAAC,CAAC;AAChC,MAAM,SAAS,GAAGC,gBAAK,CAAC,UAAU,CAIhC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BC,gCAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAA,QAAA,EAC7CA,4CAAO,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAA,GAAM,KAAK,EAAI,CAAA,EAAA,CAC3D,CACP,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC;AAEhC,MAAM,MAAM,GAAGH,SAAG,CAACC,oBAAM,CAAC,MAAM,CAAC,CAAC;AAClC,MAAM,WAAW,GAAGC,gBAAK,CAAC,UAAU,CAIlC,CAA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E,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;MAE7B,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;AAC5C,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,GAAG,EAAE,QAAQ;AACb,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,OAAO,EAAE,YAAY;AACtB,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"table.cjs","sources":["../../table/table.tsx"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport styles from \"./table.module.css\";\n\nconst table = cva(styles.table);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableRoot = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> &\n React.PropsWithChildren<VariantProps<typeof table>>\n>(({ className, ...props }, ref) => (\n <div style={{ width: \"100%\", overflow: \"auto\" }}>\n <table ref={ref} className={table({ className })} {...props} />\n </div>\n));\nTableRoot.displayName = \"Table\";\n\nconst header = cva(styles.header);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof header>>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={header({ className })} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst body = cva(styles.body);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof body>>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={body({ className })} {...props} />\n));\nTableBody.displayName = \"TableBody\";\n\nconst footer = cva(styles.footer);\n/**\n * @deprecated TableFooter is removed and no longer supported in `@raystack/apsara/v1`\n */\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof footer>>\n>(({ className, ...props }, ref) => (\n <tfoot ref={ref} className={footer({ className })} {...props} />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst row = cva(styles.row);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement> &\n React.PropsWithChildren<VariantProps<typeof row>>\n>(({ className, ...props }, ref) => (\n <tr ref={ref} className={row({ className })} {...props} />\n));\nTableRow.displayName = \"TableRow\";\n\nconst head = cva(styles.head);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <th ref={ref} className={head({ className })} {...props} />\n));\nTableHead.displayName = \"TableHead\";\n\nconst cell = cva(styles.cell);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <td ref={ref} className={cell({ className })} {...props} />\n));\nTableCell.displayName = \"TableCell\";\n\nconst caption = cva(styles.caption);\n/**\n * @deprecated TableCaption is removed and no longer supported in `@raystack/apsara/v1`\n */\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={caption({ className })} {...props} />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport const Table = Object.assign(TableRoot, {\n Header: TableHeader,\n Body: TableBody,\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Root":"","sources":["../../table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../table/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA4G/B,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;CAQhB,CAAC"}
|
package/dist/table/table.js
CHANGED
|
@@ -4,27 +4,51 @@ import * as React from 'react';
|
|
|
4
4
|
import styles from './table.module.css.js';
|
|
5
5
|
|
|
6
6
|
const table = cva(styles.table);
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
9
|
+
*/
|
|
7
10
|
const TableRoot = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("div", { style: { width: "100%", overflow: "auto" }, children: jsxRuntimeExports.jsx("table", { ref: ref, className: table({ className }), ...props }) })));
|
|
8
11
|
TableRoot.displayName = "Table";
|
|
9
12
|
const header = cva(styles.header);
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
15
|
+
*/
|
|
10
16
|
const TableHeader = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("thead", { ref: ref, className: header({ className }), ...props })));
|
|
11
17
|
TableHeader.displayName = "TableHeader";
|
|
12
18
|
const body = cva(styles.body);
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
21
|
+
*/
|
|
13
22
|
const TableBody = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("tbody", { ref: ref, className: body({ className }), ...props })));
|
|
14
23
|
TableBody.displayName = "TableBody";
|
|
15
24
|
const footer = cva(styles.footer);
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated TableFooter is removed and no longer supported in `@raystack/apsara/v1`
|
|
27
|
+
*/
|
|
16
28
|
const TableFooter = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("tfoot", { ref: ref, className: footer({ className }), ...props })));
|
|
17
29
|
TableFooter.displayName = "TableFooter";
|
|
18
30
|
const row = cva(styles.row);
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
33
|
+
*/
|
|
19
34
|
const TableRow = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("tr", { ref: ref, className: row({ className }), ...props })));
|
|
20
35
|
TableRow.displayName = "TableRow";
|
|
21
36
|
const head = cva(styles.head);
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
39
|
+
*/
|
|
22
40
|
const TableHead = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("th", { ref: ref, className: head({ className }), ...props })));
|
|
23
41
|
TableHead.displayName = "TableHead";
|
|
24
42
|
const cell = cva(styles.cell);
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated Use Table from '@raystack/apsara/v1' instead.
|
|
45
|
+
*/
|
|
25
46
|
const TableCell = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("td", { ref: ref, className: cell({ className }), ...props })));
|
|
26
47
|
TableCell.displayName = "TableCell";
|
|
27
48
|
const caption = cva(styles.caption);
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated TableCaption is removed and no longer supported in `@raystack/apsara/v1`
|
|
51
|
+
*/
|
|
28
52
|
const TableCaption = React.forwardRef(({ className, ...props }, ref) => (jsxRuntimeExports.jsx("caption", { ref: ref, className: caption({ className }), ...props })));
|
|
29
53
|
TableCaption.displayName = "TableCaption";
|
|
30
54
|
const Table = Object.assign(TableRoot, {
|
package/dist/table/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sources":["../../table/table.tsx"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport styles from \"./table.module.css\";\n\nconst table = cva(styles.table);\nconst TableRoot = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> &\n React.PropsWithChildren<VariantProps<typeof table>>\n>(({ className, ...props }, ref) => (\n <div style={{ width: \"100%\", overflow: \"auto\" }}>\n <table ref={ref} className={table({ className })} {...props} />\n </div>\n));\nTableRoot.displayName = \"Table\";\n\nconst header = cva(styles.header);\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof header>>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={header({ className })} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst body = cva(styles.body);\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof body>>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={body({ className })} {...props} />\n));\nTableBody.displayName = \"TableBody\";\n\nconst footer = cva(styles.footer);\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof footer>>\n>(({ className, ...props }, ref) => (\n <tfoot ref={ref} className={footer({ className })} {...props} />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst row = cva(styles.row);\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement> &\n React.PropsWithChildren<VariantProps<typeof row>>\n>(({ className, ...props }, ref) => (\n <tr ref={ref} className={row({ className })} {...props} />\n));\nTableRow.displayName = \"TableRow\";\n\nconst head = cva(styles.head);\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <th ref={ref} className={head({ className })} {...props} />\n));\nTableHead.displayName = \"TableHead\";\n\nconst cell = cva(styles.cell);\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <td ref={ref} className={cell({ className })} {...props} />\n));\nTableCell.displayName = \"TableCell\";\n\nconst caption = cva(styles.caption);\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={caption({ className })} {...props} />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport const Table = Object.assign(TableRoot, {\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Head: TableHead,\n Row: TableRow,\n Cell: TableCell,\n Caption: TableCaption,\n});\n"],"names":["_jsx"],"mappings":";;;;;AAIA,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAIhC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAA,QAAA,EAC7CA,iCAAO,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,EAAA,GAAM,KAAK,EAAI,CAAA,EAAA,CAC3D,CACP,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,OAAO,CAAC;AAEhC,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAClC,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAIlC,CAAC,EAAE,SAAS,EAA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c,CAAC;MAE7B,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;AAC5C,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,GAAG,EAAE,QAAQ;AACb,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,OAAO,EAAE,YAAY;AACtB,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../table/table.tsx"],"sourcesContent":["import { cva, VariantProps } from \"class-variance-authority\";\nimport * as React from \"react\";\nimport styles from \"./table.module.css\";\n\nconst table = cva(styles.table);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableRoot = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement> &\n React.PropsWithChildren<VariantProps<typeof table>>\n>(({ className, ...props }, ref) => (\n <div style={{ width: \"100%\", overflow: \"auto\" }}>\n <table ref={ref} className={table({ className })} {...props} />\n </div>\n));\nTableRoot.displayName = \"Table\";\n\nconst header = cva(styles.header);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof header>>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={header({ className })} {...props} />\n));\nTableHeader.displayName = \"TableHeader\";\n\nconst body = cva(styles.body);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof body>>\n>(({ className, ...props }, ref) => (\n <tbody ref={ref} className={body({ className })} {...props} />\n));\nTableBody.displayName = \"TableBody\";\n\nconst footer = cva(styles.footer);\n/**\n * @deprecated TableFooter is removed and no longer supported in `@raystack/apsara/v1`\n */\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement> &\n React.PropsWithChildren<VariantProps<typeof footer>>\n>(({ className, ...props }, ref) => (\n <tfoot ref={ref} className={footer({ className })} {...props} />\n));\nTableFooter.displayName = \"TableFooter\";\n\nconst row = cva(styles.row);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement> &\n React.PropsWithChildren<VariantProps<typeof row>>\n>(({ className, ...props }, ref) => (\n <tr ref={ref} className={row({ className })} {...props} />\n));\nTableRow.displayName = \"TableRow\";\n\nconst head = cva(styles.head);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <th ref={ref} className={head({ className })} {...props} />\n));\nTableHead.displayName = \"TableHead\";\n\nconst cell = cva(styles.cell);\n/**\n * @deprecated Use Table from '@raystack/apsara/v1' instead.\n */\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement> &\n React.PropsWithChildren<VariantProps<typeof head>>\n>(({ className, ...props }, ref) => (\n <td ref={ref} className={cell({ className })} {...props} />\n));\nTableCell.displayName = \"TableCell\";\n\nconst caption = cva(styles.caption);\n/**\n * @deprecated TableCaption is removed and no longer supported in `@raystack/apsara/v1`\n */\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption ref={ref} className={caption({ className })} {...props} />\n));\nTableCaption.displayName = \"TableCaption\";\n\nexport const Table = Object.assign(TableRoot, {\n Header: TableHeader,\n Body: TableBody,\n Footer: TableFooter,\n Head: TableHead,\n Row: TableRow,\n Cell: TableCell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AEpC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9B;;AAEG;AACH,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CAIhC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAA,CAAA,IAAA,EAAA,EAAI,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,EAAA,GAAM,KAAK,EAAI,CAAA,CAC5D,CAAC,CAAC;AACH,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;AAEpC,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACpC;;AAEG;AACH,MAAM,YAAY,GAAG,KAAK,CAAC,UAAU,CAGnC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,qBAAA,CAAA,SAAA,EAAA,EAAS,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,EAAA,GAAM,KAAK,EAAI,CAAA,CACpE,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;MAE7B,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE;AAC5C,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,MAAM,EAAE,WAAW;AACnB,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,GAAG,EAAE,QAAQ;AACb,IAAA,IAAI,EAAE,SAAS;AACf,IAAA,OAAO,EAAE,YAAY;AACtB,CAAA;;;;"}
|
|
@@ -6,14 +6,23 @@ var togglegroup_module = require('./togglegroup.module.css.cjs');
|
|
|
6
6
|
var index$1 = require('../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
|
|
7
7
|
|
|
8
8
|
const root = index$1.cva(togglegroup_module.default.root);
|
|
9
|
+
/*
|
|
10
|
+
* @deprecated Use Tabs from @raystack/apsara/v1 instead.
|
|
11
|
+
*/
|
|
9
12
|
const ToggleGroupRoot = ({ className, ...props }) => {
|
|
10
13
|
return (jsxRuntime.jsxRuntimeExports.jsx(index.Root, { className: root({ className }), ...props }));
|
|
11
14
|
};
|
|
12
15
|
ToggleGroupRoot.defaultProps = { type: "single" };
|
|
13
16
|
const item = index$1.cva(togglegroup_module.default.item);
|
|
17
|
+
/*
|
|
18
|
+
* @deprecated Use Tabs from @raystack/apsara/v1 instead.
|
|
19
|
+
*/
|
|
14
20
|
const ToggleGroupItem = ({ className, ...props }) => {
|
|
15
21
|
return (jsxRuntime.jsxRuntimeExports.jsx(index.Item, { className: item({ className }), ...props }));
|
|
16
22
|
};
|
|
23
|
+
/*
|
|
24
|
+
* @deprecated Use Tabs from @raystack/apsara/v1 instead.
|
|
25
|
+
*/
|
|
17
26
|
const ToggleGroup = Object.assign(ToggleGroupRoot, {
|
|
18
27
|
Item: ToggleGroupItem,
|
|
19
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"togglegroup.cjs","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["cva","styles","_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;;;AAKA,MAAM,IAAI,GAAGA,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"togglegroup.cjs","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["cva","styles","_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;;;AAKA,MAAM,IAAI,GAAGA,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;AAO9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,KAAI;AAC3E,IAAA,QACEC,gCAAC,CAAAC,UAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF,eAAe,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAElD,MAAM,IAAI,GAAGH,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;AAS9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,QACEC,gCAAC,CAAAE,UAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF;;AAEG;MACU,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACxD,IAAA,IAAI,EAAE,eAAe;AACtB,CAAA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"togglegroup.d.ts","sourceRoot":"","sources":["../../toggle-group/togglegroup.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAE9B,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CACrD,OAAO,oBAAoB,CAAC,IAAI,CACjC,GACC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"togglegroup.d.ts","sourceRoot":"","sources":["../../toggle-group/togglegroup.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAE9B,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CACrD,OAAO,oBAAoB,CAAC,IAAI,CACjC,GACC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AAK5B,eAAO,MAAM,eAAe;8BAA6B,gBAAgB;;;;CAIxE,CAAC;AAIF,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAK9B,MAAM,WAAW,oBACf,SAAQ,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,EAChE,YAAY,CAAC,OAAO,IAAI,CAAC;CAAG;AAKhC,eAAO,MAAM,eAAe,4BAGzB,oBAAoB,4CAItB,CAAC;AAKF,eAAO,MAAM,WAAW;8BAhCiC,gBAAgB;;;;;oCAuBtE,oBAAoB;CAWrB,CAAC"}
|
|
@@ -4,14 +4,23 @@ import styles from './togglegroup.module.css.js';
|
|
|
4
4
|
import { cva } from '../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
|
|
5
5
|
|
|
6
6
|
const root = cva(styles.root);
|
|
7
|
+
/*
|
|
8
|
+
* @deprecated Use Tabs from @raystack/apsara/v1 instead.
|
|
9
|
+
*/
|
|
7
10
|
const ToggleGroupRoot = ({ className, ...props }) => {
|
|
8
11
|
return (jsxRuntimeExports.jsx($6c1fd9e6a8969628$export$be92b6f5f03c0fe9, { className: root({ className }), ...props }));
|
|
9
12
|
};
|
|
10
13
|
ToggleGroupRoot.defaultProps = { type: "single" };
|
|
11
14
|
const item = cva(styles.item);
|
|
15
|
+
/*
|
|
16
|
+
* @deprecated Use Tabs from @raystack/apsara/v1 instead.
|
|
17
|
+
*/
|
|
12
18
|
const ToggleGroupItem = ({ className, ...props }) => {
|
|
13
19
|
return (jsxRuntimeExports.jsx($6c1fd9e6a8969628$export$6d08773d2e66f8f2, { className: item({ className }), ...props }));
|
|
14
20
|
};
|
|
21
|
+
/*
|
|
22
|
+
* @deprecated Use Tabs from @raystack/apsara/v1 instead.
|
|
23
|
+
*/
|
|
15
24
|
const ToggleGroup = Object.assign(ToggleGroupRoot, {
|
|
16
25
|
Item: ToggleGroupItem,
|
|
17
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"togglegroup.js","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"togglegroup.js","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\n/*\n * @deprecated Use Tabs from @raystack/apsara/v1 instead.\n */\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAO9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,KAAI;AAC3E,IAAA,QACEA,qBAAC,CAAAC,yCAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF,eAAe,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAElD,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAS9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,QACED,qBAAC,CAAAE,yCAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF;;AAEG;MACU,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACxD,IAAA,IAAI,EAAE,eAAe;AACtB,CAAA;;;;"}
|
|
@@ -10,7 +10,7 @@ var textfield = require('../textfield/textfield.cjs');
|
|
|
10
10
|
var calendar = require('./calendar.cjs');
|
|
11
11
|
var calendar_module = require('./calendar.module.css.cjs');
|
|
12
12
|
|
|
13
|
-
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, onSelect = () => { }, value = {
|
|
13
|
+
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, placeholders, calendarProps, onSelect = () => { }, value = {
|
|
14
14
|
to: new Date(),
|
|
15
15
|
from: new Date(),
|
|
16
16
|
}, pickerGroupClassName, children, showCalendarIcon = true, }) {
|
|
@@ -41,7 +41,7 @@ function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps,
|
|
|
41
41
|
function onOpenChange(open) {
|
|
42
42
|
setShowCalendar(Boolean(open));
|
|
43
43
|
}
|
|
44
|
-
const defaultTrigger = (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps }), jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps })] }));
|
|
44
|
+
const defaultTrigger = (jsxRuntime.jsxRuntimeExports.jsxs(flex.Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.startDate || "Select start date" }), jsxRuntime.jsxRuntimeExports.jsx(textfield.TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.CalendarIcon, {}) : undefined, className: calendar_module.default.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.endDate || "Select end date" })] }));
|
|
45
45
|
const trigger = typeof children === 'function'
|
|
46
46
|
? children({ startDate, endDate })
|
|
47
47
|
: children || defaultTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-picker.cjs","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["useState","dayjs","_jsxs","Flex","_jsx","TextField","CalendarIcon","styles","Popover","Calendar"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"range-picker.cjs","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n placeholders?: { startDate?: string; endDate?: string };\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n placeholders,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.startDate || \"Select start date\"}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.endDate || \"Select end date\"}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["useState","dayjs","_jsxs","Flex","_jsx","TextField","CalendarIcon","styles","Popover","Calendar"],"mappings":";;;;;;;;;;;;AA2BM,SAAU,WAAW,CAAC,EA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,EAAA,CACrDJ,gCAAC,CAAAI,eAAO,CAAC,OAAO,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACrB,OAAO,EACQ,CAAA,EAClBJ,gCAAC,CAAAI,eAAO,CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAED,uBAAM,CAAC,eAAe,EAAA,QAAA,EAC5DH,gCAAC,CAAAK,iBAAQ,IACP,eAAe,EAAE,KAAK,EACtB,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,aAAa,CAAC,IAAI,EAChC,QAAQ,EAAE,IAAI,EACV,GAAA,aAAa,EACjB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,EAAA,CACtB,EACc,CAAA,CAAA,EAAA,CACV,EACV;AACJ;;;;"}
|
|
@@ -4,6 +4,10 @@ interface RangePickerProps {
|
|
|
4
4
|
side?: "top" | "right" | "bottom" | "left";
|
|
5
5
|
dateFormat?: string;
|
|
6
6
|
textFieldProps?: TextfieldProps;
|
|
7
|
+
placeholders?: {
|
|
8
|
+
startDate?: string;
|
|
9
|
+
endDate?: string;
|
|
10
|
+
};
|
|
7
11
|
calendarProps?: PropsRangeRequired & PropsBase;
|
|
8
12
|
onSelect?: (date: DateRange) => void;
|
|
9
13
|
pickerGroupClassName?: string;
|
|
@@ -14,6 +18,6 @@ interface RangePickerProps {
|
|
|
14
18
|
}) => React.ReactNode);
|
|
15
19
|
showCalendarIcon?: boolean;
|
|
16
20
|
}
|
|
17
|
-
export declare function RangePicker({ side, dateFormat, textFieldProps, calendarProps, onSelect, value, pickerGroupClassName, children, showCalendarIcon, }: RangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function RangePicker({ side, dateFormat, textFieldProps, placeholders, calendarProps, onSelect, value, pickerGroupClassName, children, showCalendarIcon, }: RangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
22
|
export {};
|
|
19
23
|
//# sourceMappingURL=range-picker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-picker.d.ts","sourceRoot":"","sources":["../../../../v1/components/calendar/range-picker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAK5E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,aAAa,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAClG,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAID,wBAAgB,WAAW,CAAC,EAC1B,IAAY,EACZ,UAAyB,EACzB,cAAc,EACd,aAAa,EACb,QAAmB,EACnB,KAGC,EACD,oBAAoB,EACpB,QAAQ,EACR,gBAAuB,GACxB,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"range-picker.d.ts","sourceRoot":"","sources":["../../../../v1/components/calendar/range-picker.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAK5E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,YAAY,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,aAAa,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IAClG,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAID,wBAAgB,WAAW,CAAC,EAC1B,IAAY,EACZ,UAAyB,EACzB,cAAc,EACd,YAAY,EACZ,aAAa,EACb,QAAmB,EACnB,KAGC,EACD,oBAAoB,EACpB,QAAQ,EACR,gBAAuB,GACxB,EAAE,gBAAgB,2CA6ElB"}
|
|
@@ -8,7 +8,7 @@ import { TextField } from '../textfield/textfield.js';
|
|
|
8
8
|
import { Calendar } from './calendar.js';
|
|
9
9
|
import styles from './calendar.module.css.js';
|
|
10
10
|
|
|
11
|
-
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, onSelect = () => { }, value = {
|
|
11
|
+
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, placeholders, calendarProps, onSelect = () => { }, value = {
|
|
12
12
|
to: new Date(),
|
|
13
13
|
from: new Date(),
|
|
14
14
|
}, pickerGroupClassName, children, showCalendarIcon = true, }) {
|
|
@@ -39,7 +39,7 @@ function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps,
|
|
|
39
39
|
function onOpenChange(open) {
|
|
40
40
|
setShowCalendar(Boolean(open));
|
|
41
41
|
}
|
|
42
|
-
const defaultTrigger = (jsxRuntimeExports.jsxs(Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntimeExports.jsx(TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps }), jsxRuntimeExports.jsx(TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps })] }));
|
|
42
|
+
const defaultTrigger = (jsxRuntimeExports.jsxs(Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntimeExports.jsx(TextField, { value: startDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.startDate || "Select start date" }), jsxRuntimeExports.jsx(TextField, { value: endDate, trailing: showCalendarIcon ? jsxRuntimeExports.jsx(CalendarIcon, {}) : undefined, className: styles.datePickerInput, readOnly: true, ...textFieldProps, placeholder: placeholders?.endDate || "Select end date" })] }));
|
|
43
43
|
const trigger = typeof children === 'function'
|
|
44
44
|
? children({ startDate, endDate })
|
|
45
45
|
: children || defaultTrigger;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"range-picker.js","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"range-picker.js","sources":["../../../../v1/components/calendar/range-picker.tsx"],"sourcesContent":["import { CalendarIcon } from \"@radix-ui/react-icons\";\nimport dayjs from \"dayjs\";\nimport { useState } from \"react\";\nimport { DateRange, PropsBase, PropsRangeRequired } from \"react-day-picker\";\n\nimport { Flex } from \"../flex\";\nimport { Popover } from \"../popover\";\nimport { TextField } from \"../textfield\";\nimport { TextfieldProps } from \"../textfield/textfield\";\nimport { Calendar } from \"./calendar\";\nimport styles from \"./calendar.module.css\";\n\ninterface RangePickerProps {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n dateFormat?: string;\n textFieldProps?: TextfieldProps;\n placeholders?: { startDate?: string; endDate?: string };\n calendarProps?: PropsRangeRequired & PropsBase;\n onSelect?: (date: DateRange) => void;\n pickerGroupClassName?: string;\n value?: DateRange;\n children?: React.ReactNode | ((props: { startDate: string; endDate: string }) => React.ReactNode);\n showCalendarIcon?: boolean;\n}\n\ntype RangeFields = keyof DateRange;\n\nexport function RangePicker({\n side = \"top\",\n dateFormat = \"DD/MM/YYYY\",\n textFieldProps,\n placeholders,\n calendarProps,\n onSelect = () => {},\n value = {\n to: new Date(),\n from: new Date(),\n },\n pickerGroupClassName,\n children,\n showCalendarIcon = true,\n}: RangePickerProps) {\n const [showCalendar, setShowCalendar] = useState(false);\n const [currentRangeField, setCurrentRangeField] = useState<RangeFields>(\"from\");\n const [selectedRange, setSelectedRange] = useState(value);\n\n const startDate = selectedRange.from ? dayjs(selectedRange.from).format(dateFormat) : '';\n const endDate = selectedRange.to ? dayjs(selectedRange.to).format(dateFormat) : '';\n\n // 1st click will select the start date.\n // 2nd click will select the end date.\n // 3rd click will select the start date again.\n const handleSelect = (range: DateRange, selectedDay: Date) => {\n const from = selectedRange?.from || range?.from;\n let newRange: DateRange;\n \n if (currentRangeField === \"to\" && dayjs(selectedDay).isAfter(dayjs(from))) {\n // update the end date\n newRange = { from, to: selectedDay };\n setCurrentRangeField(\"from\");\n } else {\n // reset the range and select start day\n newRange = { from: selectedDay };\n setCurrentRangeField(\"to\");\n }\n \n setSelectedRange(newRange);\n onSelect(newRange);\n };\n\n function onOpenChange(open?: boolean) {\n setShowCalendar(Boolean(open));\n }\n\n const defaultTrigger = (\n <Flex gap={\"medium\"} className={pickerGroupClassName}>\n <TextField\n value={startDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.startDate || \"Select start date\"}\n />\n <TextField\n value={endDate}\n trailing={showCalendarIcon ? <CalendarIcon /> : undefined}\n className={styles.datePickerInput}\n readOnly\n {...textFieldProps}\n placeholder={placeholders?.endDate || \"Select end date\"}\n />\n </Flex>\n );\n\n const trigger = typeof children === 'function' \n ? children({ startDate, endDate }) \n : children || defaultTrigger;\n\n return (\n <Popover open={showCalendar} onOpenChange={onOpenChange}>\n <Popover.Trigger asChild>\n {trigger}\n </Popover.Trigger>\n <Popover.Content side={side} className={styles.calendarPopover}>\n <Calendar\n showOutsideDays={false}\n numberOfMonths={2}\n defaultMonth={selectedRange.from}\n required={true}\n {...calendarProps}\n mode=\"range\"\n selected={selectedRange}\n onSelect={handleSelect}\n />\n </Popover.Content>\n </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AC,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAA,QAAA,EAAA,CACrDC,qBAAC,CAAA,OAAO,CAAC,OAAO,EAAA,EAAC,OAAO,EAAA,IAAA,EAAA,QAAA,EACrB,OAAO,EACQ,CAAA,EAClBA,qBAAC,CAAA,OAAO,CAAC,OAAO,EAAA,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,eAAe,EAAA,QAAA,EAC5DA,qBAAC,CAAA,QAAQ,IACP,eAAe,EAAE,KAAK,EACtB,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,aAAa,CAAC,IAAI,EAChC,QAAQ,EAAE,IAAI,EACV,GAAA,aAAa,EACjB,IAAI,EAAC,OAAO,EACZ,QAAQ,EAAE,aAAa,EACvB,QAAQ,EAAE,YAAY,EAAA,CACtB,EACc,CAAA,CAAA,EAAA,CACV,EACV;AACJ;;;;"}
|
|
@@ -14,23 +14,23 @@ const chip = index.cva(chip_module.default.chip, {
|
|
|
14
14
|
large: chip_module.default["chip-size-large"],
|
|
15
15
|
small: chip_module.default["chip-size-small"],
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
neutral: chip_module.default["chip-
|
|
19
|
-
accent: chip_module.default["chip-
|
|
17
|
+
color: {
|
|
18
|
+
neutral: chip_module.default["chip-color-neutral"],
|
|
19
|
+
accent: chip_module.default["chip-color-accent"],
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
defaultVariants: {
|
|
23
23
|
variant: "outline",
|
|
24
24
|
size: "small",
|
|
25
|
-
|
|
25
|
+
color: "neutral"
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
const Chip = ({ variant, size,
|
|
28
|
+
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, role = "status", ariaLabel, }) => {
|
|
29
29
|
const handleDismiss = (e) => {
|
|
30
30
|
e.stopPropagation();
|
|
31
31
|
onDismiss?.();
|
|
32
32
|
};
|
|
33
|
-
return (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: chip({ variant, size,
|
|
33
|
+
return (jsxRuntime.jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === 'string' ? children : undefined), children: [leadingIcon && (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default['leading-icon'], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntime.jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: chip_module.default['dismiss-button'], "aria-label": `Remove ${typeof children === 'string' ? children : 'item'}`, type: "button", children: jsxRuntime.jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntime.jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntime.jsxRuntimeExports.jsx("span", { className: chip_module.default['trailing-icon'], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
34
34
|
};
|
|
35
35
|
Chip.displayName = "Chip";
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.cjs","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"chip.cjs","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\"\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n role?: string;\n ariaLabel?: string;\n}\n\nexport const Chip = ({ \n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n role = \"status\",\n ariaLabel,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span \n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={ariaLabel || (typeof children === 'string' ? children : undefined)}\n >\n {leadingIcon && (\n <span \n className={styles['leading-icon']} \n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button \n onClick={handleDismiss} \n className={styles['dismiss-button']}\n aria-label={`Remove ${typeof children === 'string' ? children : 'item'}`}\n type=\"button\"\n >\n <svg \n width=\"12\" \n height=\"12\" \n viewBox=\"0 0 12 12\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path \n fillRule=\"evenodd\" \n clipRule=\"evenodd\" \n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\" \n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span \n className={styles['trailing-icon']}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";"],"names":["cva","styles","_jsxs","_jsx"],"mappings":";;;;;;AAKA,MAAM,IAAI,GAAGA,SAAG,CAACC,mBAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAEA,mBAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAEA,mBAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAEA,mBAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAEA,mBAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAEA,mBAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF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EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,qgBAAqgB,EACvgB,IAAI,EAAC,cAAc,GACnB,EACE,CAAA,EAAA,CACC,IACP,YAAY,IACdA,gCACE,CAAA,MAAA,EAAA,EAAA,SAAS,EAAEF,mBAAM,CAAC,eAAe,CAAC,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,YAElB,YAAY,EAAA,CACR,IACL,IAAI,CAAA,EAAA,CACH,EACP;AACJ,EAAE;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type VariantProps } from "class-variance-authority";
|
|
2
1
|
import { ReactNode } from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const chip: (props?: ({
|
|
4
4
|
variant?: "outline" | "filled" | null | undefined;
|
|
5
5
|
size?: "small" | "large" | null | undefined;
|
|
6
|
-
|
|
6
|
+
color?: "accent" | "neutral" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
8
8
|
type ChipProps = VariantProps<typeof chip> & {
|
|
9
9
|
trailingIcon?: ReactNode;
|
|
@@ -16,7 +16,7 @@ type ChipProps = VariantProps<typeof chip> & {
|
|
|
16
16
|
ariaLabel?: string;
|
|
17
17
|
};
|
|
18
18
|
export declare const Chip: {
|
|
19
|
-
({ variant, size,
|
|
19
|
+
({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, role, ariaLabel, }: ChipProps): import("react/jsx-runtime").JSX.Element;
|
|
20
20
|
displayName: string;
|
|
21
21
|
};
|
|
22
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../v1/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../../../v1/components/chip/chip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,IAAI;;;;mFAoBR,CAAC;AAEH,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,GAAG;IAC3C,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,eAAO,MAAM,IAAI;2HAYd,SAAS;;CAyDX,CAAC"}
|
|
@@ -12,23 +12,23 @@ const chip = cva(styles.chip, {
|
|
|
12
12
|
large: styles["chip-size-large"],
|
|
13
13
|
small: styles["chip-size-small"],
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
neutral: styles["chip-
|
|
17
|
-
accent: styles["chip-
|
|
15
|
+
color: {
|
|
16
|
+
neutral: styles["chip-color-neutral"],
|
|
17
|
+
accent: styles["chip-color-accent"],
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
defaultVariants: {
|
|
21
21
|
variant: "outline",
|
|
22
22
|
size: "small",
|
|
23
|
-
|
|
23
|
+
color: "neutral"
|
|
24
24
|
},
|
|
25
25
|
});
|
|
26
|
-
const Chip = ({ variant, size,
|
|
26
|
+
const Chip = ({ variant, size, color, trailingIcon, leadingIcon, isDismissible, children, className, onDismiss, role = "status", ariaLabel, }) => {
|
|
27
27
|
const handleDismiss = (e) => {
|
|
28
28
|
e.stopPropagation();
|
|
29
29
|
onDismiss?.();
|
|
30
30
|
};
|
|
31
|
-
return (jsxRuntimeExports.jsxs("span", { className: chip({ variant, size,
|
|
31
|
+
return (jsxRuntimeExports.jsxs("span", { className: chip({ variant, size, color, className }), role: role, "aria-label": ariaLabel || (typeof children === 'string' ? children : undefined), children: [leadingIcon && (jsxRuntimeExports.jsx("span", { className: styles['leading-icon'], "aria-hidden": "true", role: "presentation", children: leadingIcon })), children, isDismissible ? (jsxRuntimeExports.jsx("button", { onClick: handleDismiss, className: styles['dismiss-button'], "aria-label": `Remove ${typeof children === 'string' ? children : 'item'}`, type: "button", children: jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) })) : trailingIcon ? (jsxRuntimeExports.jsx("span", { className: styles['trailing-icon'], "aria-hidden": "true", role: "presentation", children: trailingIcon })) : null] }));
|
|
32
32
|
};
|
|
33
33
|
Chip.displayName = "Chip";
|
|
34
34
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.js","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"chip.js","sources":["../../../../v1/components/chip/chip.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport styles from \"./chip.module.css\";\n\nconst chip = cva(styles.chip, {\n variants: {\n variant: {\n outline: styles[\"chip-variant-outline\"],\n filled: styles[\"chip-variant-filled\"],\n },\n size: {\n large: styles[\"chip-size-large\"],\n small: styles[\"chip-size-small\"],\n },\n color: {\n neutral: styles[\"chip-color-neutral\"],\n accent: styles[\"chip-color-accent\"],\n },\n },\n defaultVariants: {\n variant: \"outline\",\n size: \"small\",\n color: \"neutral\"\n },\n});\n\ntype ChipProps = VariantProps<typeof chip> & {\n trailingIcon?: ReactNode;\n leadingIcon?: ReactNode;\n isDismissible?: boolean;\n children: ReactNode;\n className?: string;\n onDismiss?: () => void;\n role?: string;\n ariaLabel?: string;\n}\n\nexport const Chip = ({ \n variant,\n size,\n color,\n trailingIcon,\n leadingIcon,\n isDismissible,\n children,\n className,\n onDismiss,\n role = \"status\",\n ariaLabel,\n}: ChipProps) => {\n const handleDismiss = (e: React.MouseEvent) => {\n e.stopPropagation();\n onDismiss?.();\n };\n\n return (\n <span \n className={chip({ variant, size, color, className })}\n role={role}\n aria-label={ariaLabel || (typeof children === 'string' ? children : undefined)}\n >\n {leadingIcon && (\n <span \n className={styles['leading-icon']} \n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {leadingIcon}\n </span>\n )}\n {children}\n {isDismissible ? (\n <button \n onClick={handleDismiss} \n className={styles['dismiss-button']}\n aria-label={`Remove ${typeof children === 'string' ? children : 'item'}`}\n type=\"button\"\n >\n <svg \n width=\"12\" \n height=\"12\" \n viewBox=\"0 0 12 12\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path \n fillRule=\"evenodd\" \n clipRule=\"evenodd\" \n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\" \n fill=\"currentColor\"\n />\n </svg>\n </button>\n ) : trailingIcon ? (\n <span \n className={styles['trailing-icon']}\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n {trailingIcon}\n </span>\n ) : null}\n </span>\n );\n};\n\nChip.displayName = \"Chip\";"],"names":["_jsxs","_jsx"],"mappings":";;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE;AAC5B,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE,MAAM,CAAC,sBAAsB,CAAC;AACvC,YAAA,MAAM,EAAE,MAAM,CAAC,qBAAqB,CAAC;AACtC,SAAA;AACD,QAAA,IAAI,EAAE;AACJ,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAChC,YAAA,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC;AACjC,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,MAAM,CAAC,oBAAoB,CAAC;AACrC,YAAA,MAAM,EAAE,MAAM,CAAC,mBAAmB,CAAC;AACpC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,OAAO,EAAE,SAAS;AAClB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF,CAAA,CAAC,CAAC;AAaI,MAAM,IAAI,GAAG,CAAC,EACnB,OAAO,EACP,IAAI,EACJ,KAAK,EACL,YAAY,EACZ,WAAW,EACX,aAAa,EACb,QAAQ,EACR,SAAS,EACT,SAAS,EAC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,EAAE,MAAM,CAAC,eAAe,CAAC,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,YAElB,YAAY,EAAA,CACR,IACL,IAAI,CAAA,EAAA,CACH,EACP;AACJ,EAAE;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var styles = {"chip":"chip-module_chip__EgHT3","chip-variant-outline":"chip-module_chip-variant-outline__hCEkT","chip-variant-filled":"chip-module_chip-variant-filled__NrLkO","chip-size-large":"chip-module_chip-size-large__dRgtH","chip-size-small":"chip-module_chip-size-small__KdfAe","chip-
|
|
5
|
+
var styles = {"chip":"chip-module_chip__EgHT3","chip-variant-outline":"chip-module_chip-variant-outline__hCEkT","chip-variant-filled":"chip-module_chip-variant-filled__NrLkO","chip-size-large":"chip-module_chip-size-large__dRgtH","chip-size-small":"chip-module_chip-size-small__KdfAe","chip-color-neutral":"chip-module_chip-color-neutral__UWAPC","chip-color-accent":"chip-module_chip-color-accent__X1oLG","leading-icon":"chip-module_leading-icon__S37LS","trailing-icon":"chip-module_trailing-icon__ldobb","dismiss-button":"chip-module_dismiss-button__gPMmm","chip___variant___outline":"chip-module_chip-variant-outline__hCEkT","chip___variant___filled":"chip-module_chip-variant-filled__NrLkO","chip___size___large":"chip-module_chip-size-large__dRgtH","chip___size___small":"chip-module_chip-size-small__KdfAe","chip___color___neutral":"chip-module_chip-color-neutral__UWAPC","chip___color___accent":"chip-module_chip-color-accent__X1oLG","leading___icon":"chip-module_leading-icon__S37LS","trailing___icon":"chip-module_trailing-icon__ldobb","dismiss___button":"chip-module_dismiss-button__gPMmm"};
|
|
6
6
|
|
|
7
7
|
exports.default = styles;
|
|
8
8
|
//# sourceMappingURL=chip.module.css.cjs.map
|