purgetss 3.0.4 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.editorconfig +1 -1
  2. package/README.md +3 -3
  3. package/assets/fonts/bootstrap-icons.ttf +0 -0
  4. package/assets/fonts/tabler-icons.ttf +0 -0
  5. package/assets/images/blend-modes.png +0 -0
  6. package/assets/images/shadow.png +0 -0
  7. package/bin/purgetss +6 -5
  8. package/dist/bootstrapicons.js +1714 -0
  9. package/dist/bootstrapicons.tss +1692 -0
  10. package/dist/tablericons.js +95 -1
  11. package/dist/tablericons.tss +94 -0
  12. package/dist/tailwind.tss +3242 -411
  13. package/docs/configuring-guide.md +18 -5
  14. package/docs/glossary.md +3 -4
  15. package/docs/new-glossary.md +8313 -0
  16. package/docs/whats-new/v2.5.0.md +6 -6
  17. package/docs/whats-new/v3.0.4.md +7 -6
  18. package/docs/whats-new/v3.0.5.md +136 -0
  19. package/docs/whats-new/v3.1.0.md +614 -0
  20. package/docs/whats-new/v3.1.1.md +262 -0
  21. package/index.js +397 -246
  22. package/lib/build-bootstrap-icons-js.js +64 -0
  23. package/lib/build-bootstrap-icons-tss.js +50 -0
  24. package/lib/build-fonts-folder.js +7 -0
  25. package/lib/build-tailwind.js +78 -16
  26. package/lib/helpers.js +2027 -764
  27. package/lib/templates/bootstrap-icons/bootstrap-icons.css +1705 -0
  28. package/lib/templates/bootstrap-icons/bootstrap-icons.ttf +0 -0
  29. package/lib/templates/bootstrap-icons/reset.tss +6 -0
  30. package/lib/templates/bootstrap-icons/template.js +4 -0
  31. package/lib/templates/bootstrap-icons/template.tss +2 -0
  32. package/lib/templates/custom-template.tss +1 -1
  33. package/lib/templates/tablericons/template.js +1 -1
  34. package/lib/templates/tailwind/custom-template.tss +1 -1
  35. package/lib/templates/tailwind/template.tss +1 -1
  36. package/lib/test-function.js +9 -0
  37. package/package.json +8 -5
  38. package/purgetss.config.js +950 -0
@@ -109,7 +109,7 @@ If you set a view with `.row-span-3` you can add three more views of equal heigh
109
109
  <img src="../../assets/images/grid-system-example.png" width="375" alt="Grid System Examples">
110
110
 
111
111
  ### Available utilities for `The Grid`
112
- These are the available utilities to control **”The Grid”** ( use **"TRON: Legacy"** score here! ) 🤣
112
+ These are the available utilities to control [**”The Grid”**](https://youtu.be/4-J4duzP8Ng?t=13)
113
113
 
114
114
  #### Gap
115
115
  Utilities for controlling gutters between grid.
@@ -242,10 +242,10 @@ You can create more complex animations by combining properties to different `sta
242
242
  </View>
243
243
  </View>
244
244
 
245
- <Animation id="squaresWidth" class="ease-out delay-50 open:w-11/12 close:w-28 debug-on" module="purgetss.ui" />
245
+ <Animation id="squaresWidth" class="ease-out delay-50 open:w-11/12 close:w-28 debug" module="purgetss.ui" />
246
246
  <Animation id="transparency" class="open:duration-150 close:duration-300 open:mt-(null) close:mt-8 open:w-10/12 open:h-11/12 close:w-14 close:h-14 open:opacity-50 close:opacity-100" module="purgetss.ui" />
247
247
  <Animation id="retweet" class="open:duration-200 close:duration-150 open:-mb-16 close:-mb-52" module="purgetss.ui" />
248
- <Animation id="changeColor" class="delay-25 open:bg-purple-500 close:bg-blue-700 debug-on" module="purgetss.ui" />
248
+ <Animation id="changeColor" class="delay-25 open:bg-purple-500 close:bg-blue-700 debug" module="purgetss.ui" />
249
249
  </Window>
250
250
  </Alloy>
251
251
  ```
@@ -277,7 +277,7 @@ $.index.open();
277
277
  ### Example 3
278
278
  The following example `applies` the properties to prevent the animation from showing.
279
279
 
280
- The method `apply` sets the properties instantly. The `ScrollableView` is rotated 90 degrees, and its content is counter rotated -90 degrees.
280
+ The method `apply` sets the properties instantly. In this example, the `ScrollableView` is rotated 90 degrees, and its content is counter rotated -90 degrees.
281
281
 
282
282
  ```xml
283
283
  <Alloy>
@@ -637,8 +637,8 @@ Set to true for the paging control at the top.
637
637
 
638
638
  ```css
639
639
  // pagingControlOnTop Property
640
- '.paging-on-top': { pagingControlOnTop: true }
641
- '.paging-on-bottom': { pagingControlOnTop: false }
640
+ '.paging-control-on-top': { pagingControlOnTop: true }
641
+ '.paging-control-on-bottom': { pagingControlOnTop: false }
642
642
  ```
643
643
 
644
644
  ### pagingControlTimeout
@@ -51,9 +51,9 @@ You can set them directly in your `xml` files or in your `config.js` file.
51
51
  - **Bar Color**
52
52
  - bar-(*`hex-rgb-or-rgba-value`*)
53
53
  - **Border Color**
54
- - border-color-(*`hex-rgb-or-rgba-value`*)
54
+ - border-(*`hex-rgb-or-rgba-value`*)
55
55
  - **Color**
56
- - text-color-(*`hex-rgb-or-rgba-value`*)
56
+ - text-(*`hex-rgb-or-rgba-value`*)
57
57
  - **Current Page Indicator Color**
58
58
  - current-page-(*`hex-rgb-or-rgba-value`*)
59
59
  - **Hint Text Color**
@@ -77,7 +77,7 @@ You can set them directly in your `xml` files or in your `config.js` file.
77
77
 
78
78
  ### List of Size or Dimension Properties
79
79
  - **Border Width**
80
- - border-width-(*`any-size-value-and-unit`*)
80
+ - border-(*`any-size-value-and-unit`*)
81
81
  - **Content Height**
82
82
  - content-h-(*`any-size-value-and-unit`*)
83
83
  - **Content Width**
@@ -85,7 +85,7 @@ You can set them directly in your `xml` files or in your `config.js` file.
85
85
  - **Content Width & Content Height**
86
86
  - content-(*`any-size-value-and-unit`*)
87
87
  - **Font Size**
88
- - text-size-(*`any-size-value-and-unit`*)
88
+ - text-(*`any-size-value-and-unit`*)
89
89
  - **Height**
90
90
  - grid-rows-(*`any-size-value-and-unit`*)
91
91
  - h-(*`any-size-value-and-unit`*)
@@ -137,7 +137,7 @@ You can set them directly in your `xml` files or in your `config.js` file.
137
137
  - **Duration**
138
138
  - duration-(*`number-value`*)
139
139
  - **Font Weight**
140
- - font-(*`valid-font-font-weight-value`*)
140
+ - font-(*`valid-font-weight-value`*)
141
141
  - **Max Zoom Scale**
142
142
  - max-scale-(*`number-value`*)
143
143
  - **Min Zoom Scale**
@@ -153,7 +153,7 @@ You can set them directly in your `xml` files or in your `config.js` file.
153
153
 
154
154
 
155
155
  ## Color opacity modifiers
156
- Now you can add a **color opacity modifier** to any of the available color properties, by adding an **opacity-value** between 0 and 100 to the end of the color name separated with a slash.
156
+ Now you can add a **color opacity modifier** to ANY of the available color properties, by adding an **opacity-value** between 0 and 100 to the end of the color name separated with a slash.
157
157
 
158
158
  ### In your XML files
159
159
 
@@ -236,6 +236,7 @@ module.exports = {
236
236
  - tabs-bg-{color}/opacity-value
237
237
  - **Tint Color**
238
238
  - tint-{color}/opacity-value
239
+ - **Title Color**
239
240
  - title-{color}/opacity-value
240
241
  - **Touch Feedback Color**
241
242
  - feedback-{color}/opacity-value
@@ -0,0 +1,136 @@
1
+ - [Minor Tweeks to Shadow Classes](#minor-tweeks-to-shadow-classes)
2
+ - [Activity Indicator](#activity-indicator)
3
+ - [Indicator Colors Property (ActivityIndicator)](#indicator-colors-property-activityindicator)
4
+ - [Styling the activity indicator.](#styling-the-activity-indicator)
5
+
6
+ ## Minor Tweeks to Shadow Classes
7
+ Did some minor adjustments to the shadow classes to better match the shadows from Tailwind.
8
+
9
+ Also added `drop-shadow-xx` classes for compatibility with Tailwind classes.
10
+
11
+ ```xml
12
+ <Alloy>
13
+ <Window class="grid bg-gray-100">
14
+ <View class="grid-cols-4 grid-rows-1">
15
+ <View class="vertical clip-disabled">
16
+ <Label class="mb-3 text-sm text-gray-500" text="shadow-md" />
17
+ <View class="w-24 h-24 bg-white rounded-lg shadow-md" />
18
+ </View>
19
+ </View>
20
+
21
+ <View class="grid-cols-4 grid-rows-1">
22
+ <View class="vertical clip-disabled">
23
+ <Label class="mb-3 text-sm text-gray-500" text="shadow-lg" />
24
+ <View class="w-24 h-24 bg-white rounded-lg shadow-lg"/>
25
+ </View>
26
+ </View>
27
+
28
+ <View class="grid-cols-4 grid-rows-1">
29
+ <View class="vertical clip-disabled">
30
+ <Label class="mb-3 text-sm text-gray-500" text="shadow-xl" />
31
+ <View class="w-24 h-24 bg-white rounded-lg shadow-xl"/>
32
+ </View>
33
+ </View>
34
+
35
+ <View class="grid-cols-4 grid-rows-1">
36
+ <View class="vertical clip-disabled">
37
+ <Label class="mb-3 text-sm text-gray-500" text="shadow-2xl" />
38
+ <View class="w-24 h-24 bg-white rounded-lg shadow-2xl"/>
39
+ </View>
40
+ </View>
41
+ </Window>
42
+ </Alloy>
43
+ ```
44
+
45
+ ```css
46
+ // Main styles
47
+ 'View': { width: Ti.UI.SIZE, height: Ti.UI.SIZE }
48
+ 'Window': { backgroundColor: '#ffffff' }
49
+ '.bg-white': { backgroundColor: '#ffffff' }
50
+ '.bg-gray-100': { backgroundColor: '#f3f4f6' }
51
+ '.rounded-lg': { borderRadius: 8 }
52
+ '.clip-disabled[platform=ios]': { clipMode: Ti.UI.iOS.CLIP_MODE_DISABLED }
53
+ '.text-sm': { font: { fontSize: 14 } }
54
+ '.grid': { layout: 'horizontal' }
55
+ '.grid-cols-4': { width: '25%' }
56
+ '.grid-rows-1': { height: '100%' }
57
+ '.h-24': { height: 96 }
58
+ '.vertical': { layout: 'vertical' }
59
+ '.mb-3': { bottom: 12 }
60
+ '.shadow-md': { viewShadowOffset: { x: 0, y: 3 }, viewShadowRadius: 3, viewShadowColor: '#59000000' }
61
+ '.shadow-lg': { viewShadowOffset: { x: 0, y: 4 }, viewShadowRadius: 4, viewShadowColor: '#59000000' }
62
+ '.shadow-xl': { viewShadowOffset: { x: 0, y: 6 }, viewShadowRadius: 6, viewShadowColor: '#59000000' }
63
+ '.shadow-2xl': { viewShadowOffset: { x: 0, y: 8 }, viewShadowRadius: 8, viewShadowColor: '#59000000' }
64
+ '.text-gray-500': { color: '#6b7280' }
65
+ '.w-24': { width: 96 }
66
+ ```
67
+
68
+ <img src="../../assets/images/shadow.png" alt="Drop Shadow">
69
+
70
+ ```css
71
+ // Property(ies): viewShadowOffset, viewShadowRadius, viewShadowColor - Box Shadow in Tailwind
72
+ // Component(s): Ti.UI.View
73
+ '.shadow-xs': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 1, viewShadowColor: '#59000000' }
74
+ '.shadow-sm': { viewShadowOffset: { x: 0, y: 1 }, viewShadowRadius: 1, viewShadowColor: '#59000000' }
75
+ '.shadow': { viewShadowOffset: { x: 0, y: 2 }, viewShadowRadius: 2, viewShadowColor: '#59000000' }
76
+ '.shadow-md': { viewShadowOffset: { x: 0, y: 3 }, viewShadowRadius: 3, viewShadowColor: '#59000000' }
77
+ '.shadow-lg': { viewShadowOffset: { x: 0, y: 4 }, viewShadowRadius: 4, viewShadowColor: '#59000000' }
78
+ '.shadow-xl': { viewShadowOffset: { x: 0, y: 6 }, viewShadowRadius: 6, viewShadowColor: '#59000000' }
79
+ '.shadow-2xl': { viewShadowOffset: { x: 0, y: 8 }, viewShadowRadius: 8, viewShadowColor: '#59000000' }
80
+ '.shadow-inner': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }
81
+ '.shadow-outline': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 2, viewShadowColor: '#59000000' }
82
+ '.shadow-none': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }
83
+
84
+ // Property(ies): shadowOffset, shadowRadius, shadowColor - Drop Shadow in Tailwind
85
+ // Component(s): Ti.UI.Button, Ti.UI.Label
86
+ '.drop-shadow-xs': { shadowOffset: { x: 0, y: 0 }, shadowRadius: 1, shadowColor: '#59000000' }
87
+ '.drop-shadow-sm': { shadowOffset: { x: 0, y: 1 }, shadowRadius: 1, shadowColor: '#59000000' }
88
+ '.drop-shadow': { shadowOffset: { x: 0, y: 2 }, shadowRadius: 2, shadowColor: '#59000000' }
89
+ '.drop-shadow-md': { shadowOffset: { x: 0, y: 3 }, shadowRadius: 3, shadowColor: '#59000000' }
90
+ '.drop-shadow-lg': { shadowOffset: { x: 0, y: 4 }, shadowRadius: 4, shadowColor: '#59000000' }
91
+ '.drop-shadow-xl': { shadowOffset: { x: 0, y: 6 }, shadowRadius: 6, shadowColor: '#59000000' }
92
+ '.drop-shadow-2xl': { shadowOffset: { x: 0, y: 8 }, shadowRadius: 8, shadowColor: '#59000000' }
93
+ '.drop-shadow-none': { shadowOffset: { x: 0, y: 0 }, shadowRadius: null, shadowColor: null }
94
+ ```
95
+
96
+ ## Activity Indicator
97
+ New classes for the `ActivityIndicator` View.
98
+
99
+ ```xml
100
+ <ActivityIndicator class="indicator-blue-500 activity-indicator-style-big" message="Greetings..." id="activityIndicator" />
101
+ ```
102
+
103
+ ```css
104
+ '.activity-indicator-style-big': { style: Ti.UI.ActivityIndicatorStyle.BIG }
105
+ '.indicator-blue-500': { indicatorColor: '#3b82f6' }
106
+ ```
107
+
108
+ ### Indicator Colors Property (ActivityIndicator)
109
+ New `indicatorColor` classes for the animated indicator.
110
+
111
+ ```css
112
+ // Property(ies): indicatorColor
113
+ // Component(s): Ti.UI.ActivityIndicator
114
+ '.indicator-transparent': { indicatorColor: 'transparent' }
115
+ '.indicator-black': { indicatorColor: '#000000' }
116
+ '.indicator-white': { indicatorColor: '#ffffff' }
117
+ '.indicator-slate-50': { indicatorColor: '#f8fafc' }
118
+ '.indicator-slate-100': { indicatorColor: '#f1f5f9' }
119
+ // ...
120
+ ```
121
+
122
+ And just like any other color property:
123
+ 1. You can also set an arbitrary color value using `hex`, `rgb` or `rgba` color values.
124
+ 2. You can set them directly in your `xml` files or in your `config.js` file.
125
+ 3. You can add a **[color opacity modifier](https://github.com/macCesar/purgeTSS/blob/master/docs/whats-new/v3.0.4.md#color-opacity-modifiers)** to them.
126
+
127
+ ### Styling the activity indicator.
128
+
129
+ ```css
130
+ // Property(ies): style
131
+ // Component(s): Ti.UI.ActivityIndicator
132
+ '.activity-indicator-style-big': { style: Ti.UI.ActivityIndicatorStyle.BIG }
133
+ '.activity-indicator-style-dark': { style: Ti.UI.ActivityIndicatorStyle.DARK }
134
+ '.activity-indicator-style-big-dark': { style: Ti.UI.ActivityIndicatorStyle.BIG_DARK }
135
+ '.activity-indicator-style-plain': { style: Ti.UI.ActivityIndicatorStyle.PLAIN }
136
+ ```